Skip to content

Commit 7647ed0

Browse files
committed
install ko for golang build
1 parent abd4312 commit 7647ed0

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

.github/workflows/image-ci.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
image:
15+
path:
1616
- 06-demo-application/api-golang
1717
- 06-demo-application/api-node
1818
- 06-demo-application/client-react
@@ -22,6 +22,9 @@ jobs:
2222
steps:
2323
- name: Checkout
2424
uses: actions/checkout@v4
25+
with:
26+
# Necessary to get all tags for IMAGE_TAG generation with git describe
27+
fetch-depth: 0
2528

2629
- name: Install Task
2730
uses: arduino/setup-task@v2
@@ -47,9 +50,19 @@ jobs:
4750
image_tag=$(task generate-version-tag)
4851
echo "image_tag=$image_tag" >> $GITHUB_OUTPUT
4952
53+
- uses: actions/setup-go@v4
54+
if: matrix.path == '06-demo-application/api-golang'
55+
with:
56+
go-version: "1.22.x"
57+
58+
- uses: ko-build/[email protected]
59+
if: matrix.path == '06-demo-application/api-golang'
60+
with:
61+
version: v0.15.4
62+
5063
- name: Build Image
5164
env:
5265
IMAGE_TAG: ${{ steps.generate-image-tag.outputs.image_tag }}
53-
working-directory: ${{ matrix.image }}
66+
working-directory: ${{ matrix.path }}
5467
run: |
5568
task build-container-image-multi-arch IMAGE_TAG=${IMAGE_TAG}

0 commit comments

Comments
 (0)