From 4f963586e0d9b17839aceb493a82918985bb4591 Mon Sep 17 00:00:00 2001 From: Gabriela Georgieva Date: Wed, 25 Oct 2023 12:22:08 +0200 Subject: [PATCH] Update CodeQL workflow Signed-off-by: Gabriela Georgieva --- .github/workflows/codeql-analysis.yml | 29 ++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 2309da57bdf4..93981f6d4adf 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -1,6 +1,15 @@ -name: codeql +name: "CodeQL" on: + push: + branches: + - 'master' + - '[0-9]+.[0-9]+' + tags: + - 'v*' + pull_request: + # The branches below must be a subset of the branches above + branches: [ "master" ] schedule: # ┌───────────── minute (0 - 59) # │ ┌───────────── hour (0 - 23) @@ -14,8 +23,15 @@ on: - cron: '0 9 * * 4' jobs: - codeql: - runs-on: ubuntu-20.04 + analyze: + name: Analyze + runs-on: 'ubuntu-latest' + timeout-minutes: 360 + permissions: + actions: read + contents: read + security-events: write + steps: - name: Checkout @@ -27,6 +43,11 @@ jobs: if: ${{ github.event_name == 'pull_request' }} run: | git checkout HEAD^2 + - + name: Update Go + uses: actions/setup-go@v4 + with: + go-version: '1.21' - name: Initialize CodeQL uses: github/codeql-action/init@v2 @@ -38,3 +59,5 @@ jobs: - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v2 + with: + category: "/language:go"