From 05d66e62a48c9d11218a9e786cd02e547da06e19 Mon Sep 17 00:00:00 2001 From: olsido Date: Fri, 19 Jul 2024 15:14:46 -0400 Subject: [PATCH] Sequential workflows based on conclusion example - final workflow --- ...l-workflows-based-on-conclusion--final.yml | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/8-sequential-workflows-based-on-conclusion--final.yml diff --git a/.github/workflows/8-sequential-workflows-based-on-conclusion--final.yml b/.github/workflows/8-sequential-workflows-based-on-conclusion--final.yml new file mode 100644 index 0000000..a59455d --- /dev/null +++ b/.github/workflows/8-sequential-workflows-based-on-conclusion--final.yml @@ -0,0 +1,21 @@ +name: 8 - Sequential Workflows - Final + +on: + workflow_run: + workflows: ["8 - Sequential Workflows - Success", "8 - Sequential Workflows - Failure"] + types: [completed] + +jobs: + on-success: + runs-on: ubuntu-latest + if: ${{ github.event.workflow_run.conclusion == 'success' }} + steps: + - name: Success Job Step + run: echo "The previous workflow succeeded, so this job will run." + + on-failure: + runs-on: ubuntu-latest + if: ${{ github.event.workflow_run.conclusion == 'failure' }} + steps: + - name: Failure Job Step + run: echo "The previous workflow failed, so this job will run."