diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 0f54510..62dc0ce 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -2,7 +2,9 @@ name: CodeQL on: push: + branches: [master] pull_request: + branches: [master] schedule: - cron: '0 5 * * 1' workflow_dispatch: @@ -10,13 +12,16 @@ on: permissions: {} jobs: - analyze: - name: Analyze (javascript-typescript) + # One job for every language, so the required check context is exactly `code-ql` (a matrix would suffix it + # with the language). + code-ql: + name: code-ql runs-on: ubuntu-latest permissions: actions: read contents: read security-events: write + steps: - name: Checkout code uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -26,12 +31,10 @@ jobs: - name: Initialize CodeQL uses: github/codeql-action/init@24c54180a607b1449ed407dd24f251e4e9147c8d # v4.38.3 with: - languages: javascript-typescript - - - name: Autobuild - uses: github/codeql-action/autobuild@24c54180a607b1449ed407dd24f251e4e9147c8d # v4.38.3 + languages: javascript-typescript,actions - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@24c54180a607b1449ed407dd24f251e4e9147c8d # v4.38.3 with: + # The category of the earlier `analyze` job, so the existing analyses and alerts carry over. category: /language:javascript-typescript