Skip to content

Commit 9125998

Browse files
authored
fix(actions): use repository check instead of event_name for dogfooding conditions (#727)
## Summary When external repos call the reusable release workflow via `workflow_call`, the `github.event_name` still reflects the original trigger (e.g., `workflow_dispatch` from the caller). This caused the build job and dogfooding steps to incorrectly run for external repos. This fix changes the conditions to check `github.repository == 'getsentry/craft'` instead of `github.event_name`, properly distinguishing Craft's own releases from external callers. ## Changes - Build job: `github.event_name == 'workflow_dispatch'` → `github.repository == 'getsentry/craft'` - Dogfooding step: `github.event_name == 'workflow_dispatch'` → `github.repository == 'getsentry/craft'` - External step: `github.event_name == 'workflow_call'` → `github.repository != 'getsentry/craft'`
1 parent d0c3dd9 commit 9125998

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ on:
7676
jobs:
7777
# Build job only for Craft's own releases (dogfooding)
7878
build:
79-
if: github.event_name == 'workflow_dispatch'
79+
if: github.repository == 'getsentry/craft'
8080
name: Build
8181
uses: ./.github/workflows/build.yml
8282
permissions:
@@ -114,7 +114,7 @@ jobs:
114114

115115
# For Craft's own releases: use local action (dogfooding)
116116
- name: Prepare release (dogfooding)
117-
if: github.event_name == 'workflow_dispatch'
117+
if: github.repository == 'getsentry/craft'
118118
id: craft-local
119119
uses: ./
120120
env:
@@ -125,7 +125,7 @@ jobs:
125125

126126
# For external repos: use published action
127127
- name: Prepare release
128-
if: github.event_name == 'workflow_call'
128+
if: github.repository != 'getsentry/craft'
129129
id: craft-action
130130
uses: getsentry/craft@v2
131131
env:

0 commit comments

Comments
 (0)