From 805a2ea66517e9cefa609d01c7a5a00987c844a0 Mon Sep 17 00:00:00 2001 From: Izel Levy Date: Tue, 2 Jan 2024 18:38:28 +0200 Subject: [PATCH] Fix step --- .github/workflows/build-push-image.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-push-image.yml b/.github/workflows/build-push-image.yml index 78d7c3bd..e5eb5dfa 100644 --- a/.github/workflows/build-push-image.yml +++ b/.github/workflows/build-push-image.yml @@ -30,11 +30,15 @@ jobs: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Git describe + id: ghd + uses: proudust/gh-describe@v1 - name: Export docker tag env: INPUT_TAG: ${{ inputs.image-tag }} + FALLBACK_TAG: ${{ steps.ghd.outputs.describe }} run: | - export IMAGE_TAG=${INPUT_TAG:-$(git describe --tags | sed 's/V//')} + export IMAGE_TAG=${INPUT_TAG:-$FALLBACK_TAG} echo $IMAGE_TAG echo IMAGE_TAG=$IMAGE_TAG >> $GITHUB_ENV # - name: Build and push