Run CodeQL analysis nightly
Save and restore the Go build cache and modules cache to speed up the analysis
name: "CodeQL"
+# Run the GitHub CodeQL analysis tasks against Skaffold
+# https://codeql.github.com/docs/
on:
- # just run nightly as scan takes 35m
+ # run nightly rather than on every PR as scan takes 35m
schedule:
- - cron: '23 17 * * 3'
+ - cron: '23 4 * * *'
+ workflow_dispatch:
permissions: read-all
@@ -28,6 +31,15 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2
+ - uses: actions/cache@v2
+ with:
+ path: |
+ ~/.cache/go-build
+ ~/go/pkg/mod
+ key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
+ restore-keys: |
+ ${{ runner.os }}-go-
+
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
