Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .changes/fix-cache-path.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
kind: fixed
---
Use a normalized absolute path for the binary cache so the save step works for `uses: ./` self-invocation (github.action_path ends in `/.`, which actions/cache rejected as an invalid pattern, silently skipping the save)
5 changes: 4 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,15 @@ runs:
h=$(find . -type f \( -name '*.go' -o -name 'go.mod' -o -name 'go.sum' \) \
-print0 | sort -z | xargs -0 sha256sum | sha256sum | awk '{print $1}')
echo "hash=$h" >> "$GITHUB_OUTPUT"
# Emit a normalized absolute path: github.action_path ends in "/." for
# `uses: ./`, and actions/cache rejects any path containing "/./".
echo "binpath=$(pwd -P)/release-tool" >> "$GITHUB_OUTPUT"

- name: Restore release-tool binary
id: cache-bin
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ${{ github.action_path }}/release-tool
path: ${{ steps.srchash.outputs.binpath }}
key: release-tool-${{ runner.os }}-${{ runner.arch }}-go${{ inputs.go-version }}-${{ steps.srchash.outputs.hash }}

- uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
Expand Down
Loading