Skip to content

Commit 9e99c81

Browse files
authored
ci: skip privileged PR jobs on fork PRs (#3458)
Fork PRs can't access org secrets or push to GHCR, so these two `pull_request` jobs hard-fail with no path to passing: - `claude-md-audit` - needs `CLAUDE_CODE_OAUTH_TOKEN` - `helm-pr-prerelease` `prerelease` job - needs `packages: write` to push the chart Hit this on #3449. Approving the run didn't help; the jobs ran and failed at the privileged step. The chart-validation `lint-and-test` job is fork-safe and stays untouched - that remains the merge gate for Helm changes. Gate both jobs on same-repo head: ```yaml if: github.event.pull_request.head.repo.full_name == github.repository ``` Other PR workflows already handle forks fine: `pr_checks` (typecheck/units/e2e/sdk-compat) falls back to anonymous DockerHub pulls when secrets are missing.
1 parent e8f1a7a commit 9e99c81

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

.github/workflows/claude-md-audit.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ concurrency:
1616

1717
jobs:
1818
audit:
19-
if: github.event.pull_request.draft == false
19+
if: >-
20+
github.event.pull_request.draft == false &&
21+
github.event.pull_request.head.repo.full_name == github.repository
2022
runs-on: ubuntu-latest
2123
permissions:
2224
contents: read

.github/workflows/helm-pr-prerelease.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ jobs:
5454

5555
prerelease:
5656
needs: lint-and-test
57+
if: github.event.pull_request.head.repo.full_name == github.repository
5758
runs-on: ubuntu-latest
5859
permissions:
5960
contents: read

0 commit comments

Comments
 (0)