8000 Merge pull request #1460 from github/adityasharad/actions/code-scanni… · github/codeql-action@484236c · GitHub
[go: up one dir, main page]

Skip to content

Commit 484236c

Browse files
authored
Merge pull request #1460 from github/adityasharad/actions/code-scanning-schedule
Code scanning: Add scheduled trigger to workflow
2 parents 579411f + f837e8e commit 484236c

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

.github/workflows/codeql.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
# Run checks on reopened draft PRs to support triggering PR checks on draft PRs that were opened
99
# by other workflows.
1010
types: [opened, synchronize, reopened, ready_for_review]
11+
schedule:
12+
# Weekly on Sunday.
13+
- cron: '30 1 * * 0'
1114

1215
env:
1316
CODEQL_ACTION_TESTING_ENVIRONMENT: codeql-action-pr-checks
@@ -54,7 +57,7 @@ jobs:
5457
# be the same as `tools: null`. This allows us to make the job for each of the bundles a
5558
# required status check.
5659
#
57-
# If we're running on push, then we can skip running with `tools: latest` when it would be
60+
# If we're running on push or schedule, then we can skip running with `tools: latest` when it would be
5861
# the same as running with `tools: null`.
5962
if [[ "$GITHUB_EVENT_NAME" != "pull_request" && "$CODEQL_VERSION_DEFAULT" == "$CODEQL_VERSION_LATEST" ]]; then
6063
VERSIONS_JSON='[null]'
@@ -78,8 +81,10 @@ jobs:
7881
security-events: write
7982

8083
steps:
81-
- uses: actions/checkout@v3
82-
- uses: ./init
84+
- name: Checkout
85+
uses: actions/checkout@v3
86+
- name: Initialize CodeQL
87+
uses: ./init
8388
id: init
8489
with:
8590
languages: javascript
@@ -88,4 +93,5 @@ jobs:
8893
# confirm steps.init.outputs.codeql-path points to the codeql binary
8994
- name: Print CodeQL Version
9095
run: ${{steps.init.outputs.codeql-path}} version --format=json
91-
- uses: ./analyze
96+
- name: Perform CodeQL Analysis
97+
uses: ./analyze

0 commit comments

Comments
 (0)
0