From 0605d9f87a3af9ef4060c745d69e3cc23a5f2feb Mon Sep 17 00:00:00 2001 From: Tibor Leupold Date: Fri, 2 Dec 2022 07:29:28 -0800 Subject: [PATCH] Revert "Run CD on any push" This reverts commit 593c760ca8e2441e4b0b9c5a3c7df4226698ae10. --- .github/workflows/continuous-deployment.yaml | 22 ++++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/continuous-deployment.yaml b/.github/workflows/continuous-deployment.yaml index e522790bd..d20610485 100644 --- a/.github/workflows/continuous-deployment.yaml +++ b/.github/workflows/continuous-deployment.yaml @@ -1,19 +1,19 @@ name: Continuous Deployment # Based on https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#running-a-workflow-based-on-the-conclusion-of-another-workflow -on: ["push"] +on: # Trigger this workflow (continuous deployment) when the "Continous Integration" workflow # had completed on the main branch. -# workflow_run: -# workflows: [Continuous Integration] -# types: [completed] -# branches: ["main"] + workflow_run: + workflows: [Continuous Integration] + types: [completed] + branches: ["main"] jobs: ci-success: runs-on: ubuntu-latest # Check that the triggering workflow ended successfully. -# if: ${{ github.event.workflow_run.conclusion == 'success' }} + if: ${{ github.event.workflow_run.conclusion == 'success' }} env: # This workflow uses authentication through an API token according to: https://devcenter.heroku.com/articles/authentication # Note: API token are differnt from API keys. @@ -41,8 +41,8 @@ jobs: git fetch heroku git push --dry-run heroku main:refs/heads/main -# ci-failure: -# runs-on: ubuntu-latest -# if: ${{ github.event.workflow_run.conclusion == 'failure' }} -# steps: -# - run: echo 'The continuous inegration failed. Not deploying.' + ci-failure: + runs-on: ubuntu-latest + if: ${{ github.event.workflow_run.conclusion == 'failure' }} + steps: + - run: echo 'The continuous inegration failed. Not deploying.'