From 1553e3feff9eae3049039673fc982e86805701c4 Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Wed, 13 Jan 2021 17:21:00 +0100 Subject: [PATCH] use correct git-tag --- .github/workflows/release.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f4796c7e4..2d848cba1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -54,13 +54,17 @@ jobs: with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Get git tag + run: | + echo "::set-output name=GIT_TAG::$(git describe --tags $(git rev-list --tags --max-count=1))" + id: extract_variables - name: Build and push uses: docker/build-push-action@v2 with: context: . file: ./Dockerfile push: true - tags: ${{ github.repository }}:latest + tags: ${{ github.repository }}:${{ steps.extract_variables.outputs.GIT_TAG }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache