From a8726364fa6ac539441d8700b72775e147b6b4ca Mon Sep 17 00:00:00 2001 From: shelajev Date: Tue, 24 Sep 2024 11:19:40 +0300 Subject: [PATCH] run jobs in workflows only if previous is a success! --- .github/workflows/dbc.yml | 1 + .github/workflows/google-cloudrun-docker.yml | 4 ++-- .github/workflows/scout.yml | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dbc.yml b/.github/workflows/dbc.yml index 2a8f119..c386fa8 100644 --- a/.github/workflows/dbc.yml +++ b/.github/workflows/dbc.yml @@ -16,6 +16,7 @@ env: jobs: build: runs-on: ubuntu-latest + if: ${{ github.event.workflow_run.conclusion == 'success' }} steps: - name: Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/google-cloudrun-docker.yml b/.github/workflows/google-cloudrun-docker.yml index 9bb5e9d..d847a75 100644 --- a/.github/workflows/google-cloudrun-docker.yml +++ b/.github/workflows/google-cloudrun-docker.yml @@ -1,5 +1,5 @@ -name: 'Deploy to Cloud Run' +name: 'deploy' on: workflow_run: @@ -15,7 +15,7 @@ env: jobs: deploy: runs-on: 'ubuntu-latest' - + if: ${{ github.event.workflow_run.conclusion == 'success' }} permissions: contents: 'read' id-token: 'write' diff --git a/.github/workflows/scout.yml b/.github/workflows/scout.yml index 92c737c..7acb339 100644 --- a/.github/workflows/scout.yml +++ b/.github/workflows/scout.yml @@ -17,7 +17,7 @@ env: jobs: scout: runs-on: ubuntu-latest - + if: ${{ github.event.workflow_run.conclusion == 'success' }} steps: # Login against a Docker registry except on PR