diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 1df68f7..58e5ee0 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -24,6 +24,8 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 + ref: ${{ github.ref }} + - name: Initialize CodeQL uses: github/codeql-action/init@v3 @@ -38,7 +40,7 @@ jobs: uses: github/codeql-action/analyze@v3 analyze_on_branch: - name: Analyze on PR + name: Analyze on branch if: ${{ github.actor != 'dependabot[bot]' && github.event_name != 'pull_request' }} runs-on: ubuntu-latest strategy: @@ -51,6 +53,7 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 + ref: ${{ github.ref }} - name: Initialize CodeQL uses: github/codeql-action/init@v3