Skip to content

Commit

Permalink
add setup-go action to the pack-build action
Browse files Browse the repository at this point in the history
otherwise it'll use the system toolchain to run report.go, which will
fail when it encounters the new `toolchain` directive in the root go.mod

Signed-off-by: Bohan Chen <[email protected]>
  • Loading branch information
chenbh committed Nov 21, 2023
1 parent 70df6ec commit ccf3ed5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/actions/pack-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ inputs:
runs:
using: "composite"
steps:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
- name: setup-pack-linux
if: ${{ runner.os == 'linux' }}
uses: buildpacks/github-actions/[email protected]
Expand All @@ -46,7 +50,7 @@ runs:
KPACK_VERSION=$version
KPACK_COMMIT=$GITHUB_SHA
mkdir report
export PATH="$PATH:$(pwd)"
pack build ${{ inputs.tag }} \
--builder ${{ inputs.builder }} \
Expand All @@ -55,7 +59,7 @@ runs:
--report-output-dir . \
--cache-image ${{ inputs.tag }}-cache \
--publish ${{ inputs.additional_pack_args }}
mkdir images
digest=$(go run .github/actions/pack-build/report.go -path ./report.toml)
name=$(basename ${{ inputs.tag }})
Expand Down

0 comments on commit ccf3ed5

Please sign in to comment.