From 2e2911438dff98fee4ed37523d2862abc401eb01 Mon Sep 17 00:00:00 2001 From: Mike Jensen Date: Fri, 17 Mar 2023 09:12:00 -0600 Subject: [PATCH] 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%) --- .github/workflows/codeql.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 0e290410d0f..f30c5b73cca 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -17,11 +17,20 @@ jobs: 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