From 31785401f6e7fce0b70ae28c60377d425c4b100b Mon Sep 17 00:00:00 2001 From: William Boman Date: Tue, 23 Nov 2021 22:16:09 +0100 Subject: [PATCH] fix build-and-push.sh version resolution (#132) --- .github/workflows/docker-image-test.yml | 3 ++- scripts/build-and-push.sh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-image-test.yml b/.github/workflows/docker-image-test.yml index c560386..308499e 100644 --- a/.github/workflows/docker-image-test.yml +++ b/.github/workflows/docker-image-test.yml @@ -1,6 +1,7 @@ name: Test docker containers -on: [push, pull_request] +on: + pull_request: jobs: build: diff --git a/scripts/build-and-push.sh b/scripts/build-and-push.sh index ce242e3..30a8b72 100755 --- a/scripts/build-and-push.sh +++ b/scripts/build-and-push.sh @@ -3,7 +3,7 @@ set -euo pipefail -VERSION="$GITHUB_REF" +VERSION="$(git describe --exact-match --tags HEAD)" TAG="$VERSION" MAJOR_TAG="$(sed -nre 's/^([0-9]+).*/\1/p' <<< "$VERSION")" LATEST_TAG="latest"