Skip to content

Commit a7f0e3c

Browse files
committed
make paths check via conditional to allow required checks to be skipped
1 parent c19c4fd commit a7f0e3c

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

.github/workflows/bevy_mod_scripting.yml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,27 @@ concurrency:
3131
cancel-in-progress: true
3232

3333
jobs:
34+
35+
check-needs-run:
36+
outputs:
37+
any-changes: ${{ steps.changes.outputs.src }}
38+
permissions:
39+
pull-requests: read
40+
contents: read
41+
steps:
42+
- name: Checkout
43+
uses: actions/checkout@v4
44+
- uses: dorny/paths-filter@v3
45+
id: changes
46+
with:
47+
base: main
48+
filters: |
49+
src:
50+
- 'src/**'
51+
- 'docs/**'
52+
- '.github/workflows/bevy_mod_scripting.yml'
53+
54+
3455
generate-job-matrix:
3556
runs-on: ubuntu-latest
3657
# container: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
@@ -49,13 +70,14 @@ jobs:
4970
echo "matrix=$(cat matrix-one-line.json)" >> $GITHUB_OUTPUT
5071
5172
check:
73+
needs: [check-needs-run]
5274
permissions:
5375
pull-requests: write
5476
contents: write
5577
issues: write
5678
name: Check - ${{ matrix.run_args.name }}
5779
runs-on: ${{ matrix.run_args.os }}
58-
# container: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
80+
if: ${{ needs.check-needs-run.outputs.any-changes == 'true' }}
5981
needs:
6082
- generate-job-matrix
6183
strategy:

0 commit comments

Comments
 (0)