Skip to content

Commit

Permalink
tell builder and build-dry about go.sum for go caching
Browse files Browse the repository at this point in the history
Signed-off-by: Bob Callaway <[email protected]>
  • Loading branch information
bobcallaway committed Oct 16, 2023
1 parent 92e5aa6 commit 22978eb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/actions/generate-builder/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ runs:
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
with:
go-version: ${{ inputs.go-version }}
cache-dependency-path: "__BUILDER_CHECKOUT_DIR__/go.sum"

- name: Generate builder
shell: bash
Expand Down
2 changes: 2 additions & 0 deletions .github/actions/secure-project-checkout-go/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,12 @@ runs:
if [ "${GO_VERSION_FILE}" != "" ]; then
# NOTE: We use realpath to remove the trailing '/' if present.
echo "go_version_file=${INPUT_PATH%%/}/${GO_VERSION_FILE}" >> "$GITHUB_OUTPUT"
echo "cache_dependency_path=${INPUT_PATH%%/}/go.sum" >> "$GITHUB_OUTPUT"
fi
- name: Set up Go environment
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
with:
go-version: ${{ steps.validate.outputs.go_version }}
go-version-file: ${{ steps.validate.outputs.go_version_file }}
cache-dependency-path: ${{ steps.validate.outputs.cache_dependency_path }}

0 comments on commit 22978eb

Please sign in to comment.