From 0b5a14091b00555f218d246ec60413231ecdf007 Mon Sep 17 00:00:00 2001 From: Burak Yigit Kaya Date: Mon, 12 Jan 2026 17:50:30 +0000 Subject: [PATCH] fix(action): Resolve install sub-action path for external repos When external repositories use the Craft action, GitHub Actions incorrectly resolves the relative `./install` path against the calling repository's checkout directory instead of the Craft action's directory. This fix uses conditional steps: - Dogfooding (getsentry/craft): Uses `./install` which works because the checkout is in the Craft repo - External repos: Uses `getsentry/craft/install@${{ github.action_ref }}` to fetch the sub-action from the Craft repository at the same ref --- action.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index e0aa73f7..9e1c4b48 100644 --- a/action.yml +++ b/action.yml @@ -83,9 +83,17 @@ runs: echo "GIT_AUTHOR_NAME=${GIT_USER_NAME}" >> $GITHUB_ENV echo "EMAIL=${GIT_USER_EMAIL}" >> $GITHUB_ENV - - name: Install Craft + # For dogfooding (Craft releasing itself) - local path works because + # the checkout is in the Craft repo, so ./install resolves correctly + - name: Install Craft (local) + if: github.repository == 'getsentry/craft' uses: ./install + # For external repos - use fully-qualified reference with action ref + - name: Install Craft + if: github.repository != 'getsentry/craft' + uses: getsentry/craft/install@${{ github.action_ref }} + - name: Craft Prepare id: craft shell: bash