Skip to content

Commit 474f848

Browse files
authored
ci: enable zizmor online checks at night (#15372)
Previously the tool was always run in the offline mode. Allow it to make API requests at night or via manual dispatch.
1 parent b8bf311 commit 474f848

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/actions.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ on:
1111
- main
1212
paths:
1313
- '.github/**'
14+
schedule:
15+
- cron: '22 2 * * *'
1416

1517
permissions: {}
1618

@@ -43,8 +45,8 @@ jobs:
4345
run: uvx zizmor --pedantic --format=sarif . > results.sarif
4446
env:
4547
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46-
# TODO: offline checks only to avoid any rate-limiting issues, maybe enable nightly?
47-
ZIZMOR_OFFLINE: true
48+
# run offline for branches and PRs to avoid rate limits
49+
ZIZMOR_OFFLINE: ${{ github.event_name == 'pull_request' || github.event_name == 'push' }}
4850
- name: Upload SARIF file
4951
uses: github/codeql-action/upload-sarif@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.30.5
5052
with:

0 commit comments

Comments
 (0)