Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update workflow-run-example.yml #1921

Merged
merged 1 commit into from
Feb 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
27 changes: 24 additions & 3 deletions .github/workflows/workflow-run-example.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Workflow Run Example
on:
workflow_run:
workflows: [Matrix Test]
workflows: [Matrix Example]
types: [completed]

permissions:
Expand All @@ -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 }}"