From a0022e37ee2f58fa61bd4cd880534fb41c441e2e Mon Sep 17 00:00:00 2001 From: Hannah Pullen Date: Thu, 27 Jun 2024 13:27:02 +0100 Subject: [PATCH] Use GO_VERSION build arg --- .github/workflows/test-and-lint.yml | 1 + Dockerfile | 2 +- go.mod | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-and-lint.yml b/.github/workflows/test-and-lint.yml index efaf0d4..e2a6153 100644 --- a/.github/workflows/test-and-lint.yml +++ b/.github/workflows/test-and-lint.yml @@ -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 diff --git a/Dockerfile b/Dockerfile index 3323828..af30963 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/go.mod b/go.mod index 31423cc..ae4528a 100644 --- a/go.mod +++ b/go.mod @@ -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