GH Actions: run CodeQL only on cron-job, not on pull requests

Analysis takes more than 10 minutes, which is quite long to
run, so change it to only run on a cron job.

Also changing the cron to run on Thursdays instead of Fridays;
no need to worry about security issues during the Weekend.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2020-10-01 15:29:05 +02:00
parent 749c62fb4d
commit 0d11ef3056
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
1 changed files with 15 additions and 6 deletions

View File

@ -6,13 +6,22 @@
name: "CodeQL" name: "CodeQL"
on: on:
push: # push:
branches: [master] # branches: [master]
pull_request: # pull_request:
# The branches below must be a subset of the branches above # # The branches below must be a subset of the branches above
branches: [master] # branches: [master]
schedule: schedule:
- cron: '0 9 * * 5' # ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
# │ │ ┌───────────── day of the month (1 - 31)
# │ │ │ ┌───────────── month (1 - 12)
# │ │ │ │ ┌───────────── day of the week (0 - 6) (Sunday to Saturday)
# │ │ │ │ │
# │ │ │ │ │
# │ │ │ │ │
# * * * * *
- cron: '0 9 * * 4'
jobs: jobs:
analyze: analyze: