From 9299962a594f73b73738005ba86c46fac9aa9f8c Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Tue, 6 Feb 2024 20:29:12 -0700 Subject: [PATCH] chore: update workflow-run-example.yml (#1921) --- .github/workflows/workflow-run-example.yml | 27 +++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/.github/workflows/workflow-run-example.yml b/.github/workflows/workflow-run-example.yml index 6c5f6d95..40e00cfb 100644 --- a/.github/workflows/workflow-run-example.yml +++ b/.github/workflows/workflow-run-example.yml @@ -1,7 +1,7 @@ name: Workflow Run Example on: workflow_run: - workflows: [Matrix Test] + workflows: [Matrix Example] types: [completed] permissions: @@ -12,9 +12,30 @@ jobs: runs-on: ubuntu-latest if: ${{ github.event.workflow_run.conclusion == 'success' }} steps: - - run: echo 'The triggering workflow passed' + - name: Checkout code + uses: actions/checkout@v4 + + - name: Get changed files + id: changed-files + uses: ./ + + - name: Echo list of changed files on success + run: | + echo "Changed files on success:" + echo "${{ steps.changed-files.outputs.all_changed_files }}" + on-failure: runs-on: ubuntu-latest if: ${{ github.event.workflow_run.conclusion == 'failure' }} steps: - - run: echo 'The triggering workflow failed' + - name: Checkout code + uses: actions/checkout@v4 + + - name: Get changed files + id: changed-files + uses: ./ + + - name: Echo list of changed files on failure + run: | + echo "Changed files on failure:" + echo "${{ steps.changed-files.outputs.all_changed_files }}"