mirror of
https://github.com/gravitational/teleport.git
synced 2026-11-04 02:21:02 +08:00
We still plan to address this root issue, and are tracking making CodeQl faster so it can be a required PR check: https://github.com/gravitational/SecOps/issues/269 However, until then we need to switch this job to be a scheduled task rather than on every PR and push. This is partly cost motivated, but also we are already hitting our timeouts. This PR also increases the analysis timeout so that the daily job can be sure to complete.
53 lines
1.2 KiB
YAML
53 lines
1.2 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-32core
|
|
permissions:
|
|
actions: read
|
|
contents: read
|
|
security-events: write
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
language: [ 'go', 'javascript' ]
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v3
|
|
with:
|
|
go-version-file: 'go.mod'
|
|
if: ${{ matrix.language == 'go' }}
|
|
|
|
- name: Initialize the CodeQL tools for scanning
|
|
uses: github/codeql-action/init@v2
|
|
with:
|
|
languages: ${{ matrix.language }}
|
|
timeout-minutes: 10
|
|
|
|
- name: Autobuild
|
|
uses: github/codeql-action/autobuild@v2
|
|
if: ${{ matrix.language != 'go' }}
|
|
timeout-minutes: 30
|
|
|
|
- name: Build Teleport OSS
|
|
run: |
|
|
make full
|
|
if: ${{ matrix.language == 'go' }}
|
|
|
|
- name: Perform CodeQL Analysis
|
|
uses: github/codeql-action/analyze@v2
|
|
with:
|
|
category: "/language:${{matrix.language}}"
|
|
timeout-minutes: 240
|