ci: scope dependency-review to upstream PRs - forks lack Dependency graph by default

Verified on a fork: the action fails with 'Dependency review is not
supported on this repository' until Dependency graph is manually enabled,
and forks don't inherit it. Guarded with the same
github.repository == upstream condition the other upstream-only jobs use.
With the graph enabled the action passes, so the config itself is sound.
This commit is contained in:
ayobamiseun
2026-07-08 23:39:53 +01:00
parent 1412a25f5f
commit 822c67ca55
+5 -2
View File
@@ -55,8 +55,11 @@ jobs:
- run: python tools/security_guards.py - run: python tools/security_guards.py
dependency-review: dependency-review:
name: Dependency review name: Dependency review (upstream PRs only)
if: github.event_name == 'pull_request' # Requires the repo's Dependency graph (enabled by default on public
# repos, but NOT on forks) - so this runs only on PRs to the upstream
# repo, same pattern as the other upstream-only jobs.
if: github.event_name == 'pull_request' && github.repository == 'MadsLorentzen/ai-job-search'
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4