From efe73fac2ee9b54a7d67b22a81e2b9582269aa6f Mon Sep 17 00:00:00 2001 From: Christa Hartsock Date: Thu, 7 Jul 2022 17:09:37 -0700 Subject: [PATCH] Only run deploy on main branch if tests pass --- .github/workflows/deploy.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 970310694..cdb501850 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -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'