mirror of
https://github.com/tj-actions/changed-files
synced 2024-12-17 23:44:46 +00:00
41 lines
1,013 B
YAML
41 lines
1,013 B
YAML
name: Workflow Run Example
|
|
on:
|
|
workflow_run:
|
|
workflows: [Matrix Example]
|
|
types: [completed]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
on-success:
|
|
runs-on: ubuntu-latest
|
|
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
|
steps:
|
|
- 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:
|
|
- 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 }}"
|