Fix setup-go cache configuration to avoid invalid path pattern#71
Draft
Fix setup-go cache configuration to avoid invalid path pattern#71
Conversation
Changed from using `cache-dependency-path: ${{ github.action_path }}/go.sum`
to `cache: true` and `cache-dependency-path: go.sum` to avoid the double
slash issue that was causing the warning:
"Invalid pattern '/path/.//go.sum'. Relative pathing '.' and '..' is not allowed."
The cache will now use the go.sum file from the working directory without
the problematic path concatenation.
Co-authored-by: tcarmet <8408330+tcarmet@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
setup-goaction was generating a cache restoration warning due to an invalid path pattern caused by concatenatinggithub.action_pathwith/go.sum, resulting in paths like/home/runner/work/workbench/workbench/.//go.sum.Changes
cache-dependency-path: ${{ github.action_path }}/go.sumwithcache: trueandcache-dependency-path: go.sumThis eliminates the "Relative pathing '.' and '..' is not allowed" warning while maintaining proper Go module caching.