Skip to content

Commit

Permalink
Use GO_VERSION build arg
Browse files Browse the repository at this point in the history
  • Loading branch information
Hannah Pullen committed Jun 27, 2024
1 parent 6c138b4 commit a0022e3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test-and-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ jobs:
with:
push: false
tags: ${{ env.IMAGE_TAG }}
build-args: "GO_VERSION=${{ vars.GO_VERSION }}"

- name: Check we can run the Docker image
run: docker run ${IMAGE_TAG} 3 4
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Stage 1: Build the binary
ARG GO_VERSION=1.22.4
ARG GO_VERSION
FROM golang:${GO_VERSION} AS builder

WORKDIR /app
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/hannahpullen/actions-demo

go 1.22.4
go 1.22.2

require go.uber.org/zap v1.27.0

Expand Down

0 comments on commit a0022e3

Please sign in to comment.