Skip to content

Commit 4356ea1

Browse files
Add fork guard to release workflows
Skip release jobs when run outside the apache/* namespace. Prevents forkers from hitting missing-secret failures when clicking "Run workflow" in their fork's GitHub UI. Not strictly required for security (secrets don't propagate to forks), but fails fast and obviously instead of partway through.
1 parent a7f8d72 commit 4356ea1

3 files changed

Lines changed: 3 additions & 0 deletions

File tree

.github/workflows/release-cancel-rc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ on:
4242

4343
jobs:
4444
cancel-rc:
45+
if: github.repository_owner == 'apache'
4546
name: Cancel Release Candidate
4647
runs-on: ubuntu-latest
4748
permissions:

.github/workflows/release-prepare-rc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ on:
3939

4040
jobs:
4141
prepare-rc:
42+
if: github.repository_owner == 'apache'
4243
name: Prepare Release Candidate
4344
runs-on: ubuntu-latest
4445
permissions:

.github/workflows/release-publish.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ on:
4343

4444
jobs:
4545
publish-release:
46+
if: github.repository_owner == 'apache'
4647
name: Publish Release
4748
runs-on: ubuntu-latest
4849
permissions:

0 commit comments

Comments
 (0)