mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-24 01:11:38 -05:00
Only run deploy on main branch if tests pass
This commit is contained in:
14
.github/workflows/deploy.yml
vendored
14
.github/workflows/deploy.yml
vendored
@@ -5,7 +5,7 @@ on:
|
||||
workflows: [ Run checks ]
|
||||
types:
|
||||
- completed
|
||||
# branches: [ main ]
|
||||
branches: [ main ] # Redundant, workflow_run events are only triggered on default branch (`main`)
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
@@ -13,7 +13,7 @@ permissions:
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
# if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||||
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||||
|
||||
steps:
|
||||
- name: Install container dependencies
|
||||
@@ -51,8 +51,8 @@ jobs:
|
||||
--var AWS_ACCESS_KEY_ID="$AWS_ACCESS_KEY_ID" \
|
||||
--var AWS_SECRET_ACCESS_KEY="$AWS_SECRET_ACCESS_KEY"
|
||||
|
||||
# bail:
|
||||
# runs-on: ubuntu-latest
|
||||
# if: ${{ github.event.workflow_run.conclusion == 'failure' }}
|
||||
# steps:
|
||||
# - run: echo 'Checks failed, preventing deploy'
|
||||
bail:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
|
||||
steps:
|
||||
- run: echo 'Checks failed, not deploying'
|
||||
|
||||
Reference in New Issue
Block a user