From 1fe9527dad30ed9e4a685a12ff41c1319f35cc2e Mon Sep 17 00:00:00 2001 From: BakerNet Date: Wed, 17 Jun 2026 15:55:37 -0700 Subject: [PATCH 1/2] Fix action path for local action runs --- action.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/action.yml b/action.yml index 91e9d39..59ed335 100644 --- a/action.yml +++ b/action.yml @@ -47,6 +47,8 @@ runs: { echo "release-version=${RELEASE_VERSION}" echo "bin=${RUNNER_TEMP:-/tmp}/codeowners-plus-action/codeowners-plus" + # Normalize GITHUB_ACTION_PATH: so `uses: ./` resolves cleanly + echo "action-path=$(cd "${GITHUB_ACTION_PATH}" && pwd)" } >>"$GITHUB_OUTPUT" # RELEASE_VERSION not set -> not a release: build from source (cached). @@ -62,14 +64,14 @@ runs: if: steps.resolve.outputs.release-version == '' && steps.buildcache.outputs.cache-hit != 'true' uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6 with: - go-version-file: ${{ github.action_path }}/go.mod - cache-dependency-path: ${{ github.action_path }}/go.sum + go-version-file: ${{ steps.resolve.outputs.action-path }}/go.mod + cache-dependency-path: ${{ steps.resolve.outputs.action-path }}/go.sum - name: 'Build codeowners-plus from source' if: steps.resolve.outputs.release-version == '' && steps.buildcache.outputs.cache-hit != 'true' shell: bash env: - ACTION_PATH: ${{ github.action_path }} + ACTION_PATH: ${{ steps.resolve.outputs.action-path }} BIN: ${{ steps.resolve.outputs.bin }} run: | set -euo pipefail @@ -92,7 +94,7 @@ runs: shell: bash env: REPO: ${{ github.action_repository }} - ACTION_PATH: ${{ github.action_path }} + ACTION_PATH: ${{ steps.resolve.outputs.action-path }} TAG: ${{ steps.resolve.outputs.release-version }} BIN: ${{ steps.resolve.outputs.bin }} run: '"${ACTION_PATH}/scripts/install-action.sh"' From f66fc4db8e2d7e7555ea5a2642a56e3b99b49127 Mon Sep 17 00:00:00 2001 From: BakerNet Date: Wed, 17 Jun 2026 16:02:14 -0700 Subject: [PATCH 2/2] Minor improvement --- action.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 59ed335..fcae98c 100644 --- a/action.yml +++ b/action.yml @@ -44,11 +44,12 @@ runs: RELEASE_VERSION: '' run: | set -euo pipefail + # Normalize GITHUB_ACTION_PATH so `uses: ./` resolves cleanly + ACTION_PATH=$(cd "${GITHUB_ACTION_PATH}" && pwd) { echo "release-version=${RELEASE_VERSION}" echo "bin=${RUNNER_TEMP:-/tmp}/codeowners-plus-action/codeowners-plus" - # Normalize GITHUB_ACTION_PATH: so `uses: ./` resolves cleanly - echo "action-path=$(cd "${GITHUB_ACTION_PATH}" && pwd)" + echo "action-path=${ACTION_PATH}" } >>"$GITHUB_OUTPUT" # RELEASE_VERSION not set -> not a release: build from source (cached).