From 0db2ea3ded8ba5c80f682a2a3b9fe286205be1a4 Mon Sep 17 00:00:00 2001 From: Burak Yigit Kaya Date: Thu, 22 Jan 2026 01:21:18 +0000 Subject: [PATCH] fix: use repository check instead of event_name for dogfooding conditions When external repos call the reusable workflow via workflow_call, the github.event_name still reflects the original trigger (e.g. workflow_dispatch). This caused the build job and dogfooding steps to run for external repos. Use github.repository check instead to properly distinguish Craft's own releases from external callers. --- .github/workflows/release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7712f661..cd3ebfa5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -76,7 +76,7 @@ on: jobs: # Build job only for Craft's own releases (dogfooding) build: - if: github.event_name == 'workflow_dispatch' + if: github.repository == 'getsentry/craft' name: Build uses: ./.github/workflows/build.yml permissions: @@ -114,7 +114,7 @@ jobs: # For Craft's own releases: use local action (dogfooding) - name: Prepare release (dogfooding) - if: github.event_name == 'workflow_dispatch' + if: github.repository == 'getsentry/craft' id: craft-local uses: ./ env: @@ -125,7 +125,7 @@ jobs: # For external repos: use published action - name: Prepare release - if: github.event_name == 'workflow_call' + if: github.repository != 'getsentry/craft' id: craft-action uses: getsentry/craft@v2 env: