Skip to content

Commit

Permalink
ci: adding head ref metadata to PR config (#13)
Browse files Browse the repository at this point in the history
* ci: adding head ref metadata to PR config

* ci: adding pull_request_target to if

* ci: trying to fix analyze on branch

* ci: logging event name
  • Loading branch information
ivgonzalezc authored Feb 21, 2024
1 parent 74dd4b0 commit 9a5fca1
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ permissions:
jobs:
analyze_on_PR:
name: Analyze on PR
if: ${{ github.actor != 'dependabot[bot]' && github.event_name == 'pull_request' }}
if: ${{ github.actor != 'dependabot[bot]' && ( github.event_name == 'pull_request' || github.event_name == 'pull_request_target' )}}
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -24,7 +24,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.ref }}
ref: ${{ github.head_ref }}


- name: Initialize CodeQL
Expand All @@ -41,7 +41,7 @@ jobs:

analyze_on_branch:
name: Analyze on branch
if: ${{ github.actor != 'dependabot[bot]' && github.event_name != 'pull_request' }}
if: ${{ github.actor != 'dependabot[bot]' && ( github.event_name != 'pull_request' && github.event_name != 'pull_request_target' ) }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -55,6 +55,10 @@ jobs:
fetch-depth: 0
ref: ${{ github.ref }}

- name: test event name
run: |
echo ${{ github.event_name }}
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
Expand Down

0 comments on commit 9a5fca1

Please sign in to comment.