Make the Docker image build version DOCKER_IMAGE_VERSION aware of the configured version in main.go. (#1694)

Fixes #1687
This commit is contained in:
Jeffrey Cafferata 2022-08-12 14:47:13 +02:00 committed by GitHub
parent 31723ad146
commit bd048944a3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -18,7 +18,6 @@ jobs:
environment:
DOCKER_IMAGE_NAME: stackexchange/dnscontrol
DOCKER_IMAGE_VERSION: 3.18.1
DOCKER_IMAGE_PLATFORM: linux/amd64,linux/386
steps:
@ -36,6 +35,8 @@ jobs:
name: Build multi-arch Docker images and push to Docker Hub
command: |
export DOCKER_CLI_EXPERIMENTAL=enabled
export DOCKER_IMAGE_VERSION=$(grep -E "Version *= \"" main.go | awk '{ print $3 }' | tr -d \") >> $BASH_ENV
source $BASH_ENV
docker context create multi-arch-build
docker buildx create \
--use multi-arch-build \