File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 2727 FOUND_FILES=true
2828 fi
2929 echo "found-files=${FOUND_FILES}" >> $GITHUB_OUTPUT
30+ get-github-token :
31+ name : Get GitHub Token
32+ runs-on : ${{ !github.event.repository.private && 'ubuntu-latest' || 'ubuntu-arm64-small' }}
33+ outputs :
34+ token : ${{ steps.set-output.outputs.token }}
35+ steps :
36+ - id : get-secrets
37+ uses :
grafana/shared-workflows/actions/[email protected] 38+ with :
39+ # Secrets placed in the ci/common/<path> path in Vault
40+ common_secrets : |
41+ ZIZMOR_APP_ID=zizmor:app-id
42+ ZIZMOR_PRIVATE_KEY=zizmor:private-key
43+ - name : Get GitHub Token
44+ id : get-github-token
45+ uses : actions/create-github-app-token@v2
46+ continue-on-error : true
47+ with :
48+ app-id : ${{ env.ZIZMOR_APP_ID }}
49+ private-key : ${{ env.ZIZMOR_PRIVATE_KEY }}
50+ owner : ${{ github.repository_owner }}
51+
52+ - name : Set Output
53+ id : set-output
54+ shell : bash
55+ env :
56+ TOKEN : ${{ steps.get-github-token.outputs.token || github.token}}
57+ run : |
58+ echo "token=${TOKEN}" >> $GITHUB_OUTPUT
3059 zizmor :
3160 name : Run zizmor from current branch (self test)
3261
3968
4069 needs :
4170 - zizmor-check
71+ - get-github-token
4272 if : ${{ needs.zizmor-check.outputs.found-files == 'true' }}
4373
4474 uses : grafana/shared-workflows/.github/workflows/reusable-zizmor.yml@b502a15952bab7f72daa1f8ce115491a6d97be59
4777 fail-severity : never
4878 min-severity : high
4979 min-confidence : low
80+ github-token : ${{ needs.get-github-token.outputs.token }}
You can’t perform that action at this time.
0 commit comments