Skip to content

Commit

Permalink
fix(build): sync go versions between promu crossbuild and docker imag…
Browse files Browse the repository at this point in the history
…es (#494)

fix(build): sync go versions for binaries and images
  • Loading branch information
burningalchemist authored Apr 7, 2024
1 parent ebb46db commit 0e98a1c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ jobs:
- name: Check out the repo
uses: actions/checkout@v4

- name: Get Go version from the '.promu.yml' config
id: promu-go-version
run: printf "version=%s" "$(yq '.go.version' .promu.yml)" >> $GITHUB_OUTPUT

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

Expand Down Expand Up @@ -86,3 +90,5 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
provenance: false
build-args: |
GOVERSION={{ steps.promu-go-version.outputs.version }}
4 changes: 3 additions & 1 deletion Dockerfile.multi-arch
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM --platform=$BUILDPLATFORM quay.io/prometheus/golang-builder AS builder
ARG GOVERSION=latest

FROM --platform=$BUILDPLATFORM quay.io/prometheus/golang-builder:${GOVERSION}-main AS builder

# Get sql_exporter
ADD . /go/src/github.com/burningalchemist/sql_exporter
Expand Down

0 comments on commit 0e98a1c

Please sign in to comment.