Cache Go dependencies when building CLI #1573
Merged
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.
Enables dependency caching of the Digger CLI binary being built in a deploy when not using version tags (I'm using hashes for immutability). Since it seems I can't use
hashFiles
for files outside of the workspace of the Terraform code repo running the action we copy that file to one that shouldn't collide with any source files so that we can ensure the cache key is sufficiently unique (maybe not unique enough? not sure).I'm reusing the
cache-dependencies
input here because of the name and the description provided indicating that it should probably cover this instead of just Terraform providers, and people turning that on likely want this too.Also pins the go version used by setup-go to the one in
cli
's dependency file.