Files
teleport/.github/workflows/codeql.yml
T
Mike Jensen 2e2911438d Update CodeQL Schedule to scan release branches (#23169)
* Update CodeQL Schedule to scan release branches

This allows us to switch our release branches to also use the scheduled CodeQL check so we can remove CodeQL from the PR flow for our release branches too.

* Use go dependency caching with auto build

This change speeds up the build by about ~2 minutes (10%)
2023-03-17 15:12:00 +00:00

50 lines
1.1 KiB
YAML

name: "CodeQL"
on:
schedule:
- cron: '0 13 * * *' # At 1:00 PM UTC every day
jobs:
analyze:
name: Analyze
if: ${{ !startsWith(github.head_ref, 'dependabot/') }}
runs-on: ubuntu-22.04-16core
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
branch: [ 'master', 'branch/v10', 'branch/v11', 'branch/v12' ]
language: [ 'go', 'javascript' ]
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
ref: ${{ matrix.branch }}
- name: Set up Go
uses: actions/setup-go@v4
with:
cache-dependency-path: '**/go.sum'
if: ${{ matrix.language == 'go' }}
- name: Initialize the CodeQL tools for scanning
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
timeout-minutes: 5
- name: Autobuild
uses: github/codeql-action/autobuild@v2
timeout-minutes: 30
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"
timeout-minutes: 10