3
0
Fork 0
mirror of https://github.com/tj-actions/changed-files synced 2024-12-17 23:44:46 +00:00
changed-files/.github/workflows/manual-matrix-test.yml

43 lines
1 KiB
YAML
Raw Normal View History

name: Manual Matrix Test
on:
workflow_dispatch:
jobs:
changed-files:
name: Get changes
runs-on: ubuntu-latest
outputs:
2022-08-03 21:07:20 +00:00
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0 # needed for tj-actions/changed-files
- name: Get changed files
id: changed-files
2022-08-03 20:06:08 +00:00
uses: ./
with:
json: true
- name: List all changed files
run: |
2022-08-03 21:07:20 +00:00
echo '${{ steps.changed-files.outputs.all_changed_files }}'
- id: set-matrix
2022-10-12 16:35:06 +00:00
run: echo "matrix={\"container\":${{ steps.changed-files.outputs.all_changed_files }}}" >>"$GITHUB_OUTPUT"
matrix-job:
name: Run Matrix Job
runs-on: ubuntu-latest
needs: [changed-files]
strategy:
matrix: ${{ fromJSON(needs.changed-files.outputs.matrix) }}
max-parallel: 4
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Test
run: |
2022-08-03 20:06:08 +00:00
echo ${{ matrix.container }}