File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change 77 paths :
88 - " .github/**"
99jobs :
10+ zizmor-check :
11+ name : Check whether there are things to scan
12+ permissions :
13+ contents : read
14+ runs-on : ${{ !github.event.repository.private && 'ubuntu-latest' || 'ubuntu-arm64-small' }}
15+ outputs :
16+ found-files : ${{ steps.zizmor-check.outputs.found-files }}
17+ steps :
18+ - name : Checkout
19+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
20+ - name : Run zizmor
21+ id : zizmor-check
22+ shell : bash
23+ run : |
24+ FOUND_FILES=false
25+ SEARCH=$(find . -path "**/.github/workflows/*.yml" -o -path "**/.github/workflows/*.yaml" -o -path "**/action.yml" -o -path "**/action.yaml")
26+ if [ -n "$SEARCH" ]; then
27+ FOUND_FILES=true
28+ fi
29+ echo "found-files=${FOUND_FILES}" >> $GITHUB_OUTPUT
1030 zizmor :
1131 name : Run zizmor from current branch (self test)
1232
1737 pull-requests : write
1838 security-events : write
1939
40+ needs :
41+ - zizmor-check
42+ if : ${{ needs.zizmor-check.outputs.found-files == 'true' }}
43+
2044 uses : grafana/shared-workflows/.github/workflows/reusable-zizmor.yml@b502a15952bab7f72daa1f8ce115491a6d97be59
2145 with :
2246 runs-on : ${{ !github.event.repository.private && 'ubuntu-latest' || 'ubuntu-arm64-small' }}
You can’t perform that action at this time.
0 commit comments