@@ -38,17 +38,22 @@ jobs:
3838 cask : false
3939 test-bot : false
4040
41- - name : Set up actionlint
41+ - name : Install tools
42+ run : brew install actionlint shellcheck zizmor
43+
44+ - name : Set up GITHUB_WORKSPACE
4245 env :
4346 HOMEBREW_TAP_REPOSITORY : ${{ steps.setup-homebrew.outputs.repository-path }}
4447 run : |
45- brew install actionlint shellcheck
46-
4748 # Annotations work only relative to GITHUB_WORKSPACE
4849 (shopt -s dotglob; rm -rf "${GITHUB_WORKSPACE:?}"/*; mv "${HOMEBREW_TAP_REPOSITORY:?}"/* "$GITHUB_WORKSPACE")
4950 rmdir "$HOMEBREW_TAP_REPOSITORY"
5051 ln -vs "$GITHUB_WORKSPACE" "$HOMEBREW_TAP_REPOSITORY"
5152
53+ - run : zizmor --format sarif . >results.sarif
54+
55+ - name : Set up actionlint
56+ run : |
5257 # Setting `shell: /bin/bash` prevents shellcheck from running on
5358 # those steps, so let's change them to `shell: bash` for linting.
5459 sed -i 's|shell: /bin/bash -x|shell: bash -x|' .github/workflows/*.y*ml
5863
5964 - run : actionlint
6065
61- zizmor :
62- if : github.repository_owner == 'Homebrew'
63- runs-on : ubuntu-latest
64- container :
65- image : ghcr.io/homebrew/ubuntu22.04:master
66- steps :
67- - name : Set up Homebrew
68- id : setup-homebrew
69- uses : Homebrew/actions/setup-homebrew@master
70- with :
71- core : true
72- cask : false
73- test-bot : false
74-
75- - name : Install zizmor
76- run : brew install zizmor
77-
78- - name : Run zizmor
79- run : zizmor --format sarif "${HOMEBREW_TAP_REPOSITORY}" | tee results.sarif
80- env :
81- HOMEBREW_TAP_REPOSITORY : ${{ steps.setup-homebrew.outputs.repository-path }}
82-
8366 - name : Upload SARIF file
8467 uses : github/codeql-action/upload-sarif@v3
8568 with :
0 commit comments