Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 21 additions & 2 deletions .github/workflows/codeql.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,32 @@
name: 🔍️ CodeQL

on: [push, pull_request, workflow_dispatch]
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
pull_request_target:
branches: [ main ]
types: [opened, synchronize, reopened]
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.event.pull_request.head.sha || github.ref }}
cancel-in-progress: true

jobs:
analyse:
runs-on: ${{ matrix.os }}
# Skip if CodeQL is already configured in repository settings to avoid duplicates
if: >
github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.fork == true ||
!contains(github.repository_owner, github.actor)
permissions:
security-events: write
contents: read
# Add pull-requests permission for pull_request_target
pull-requests: read
strategy:
matrix:
os:
Expand All @@ -22,6 +38,9 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
# For pull_request_target, checkout the PR head
ref: ${{ github.event.pull_request.head.sha || github.ref }}

- name: Initialise CodeQL
uses: github/codeql-action/init@v3
Expand Down