diff --git a/.github/workflows/build-push-frontend.yml b/.github/workflows/build-push-frontend.yml index fa88ca3..6473617 100644 --- a/.github/workflows/build-push-frontend.yml +++ b/.github/workflows/build-push-frontend.yml @@ -70,6 +70,16 @@ jobs: type=semver,pattern={{major}} type=sha + - name: Extract version + id: version + run: | + if [[ "${{ github.ref }}" == refs/tags/* ]]; then + VERSION=${GITHUB_REF#refs/tags/} + else + VERSION="dev-${GITHUB_SHA::7}" + fi + echo "version=$VERSION" >> $GITHUB_OUTPUT + - name: Build and push Docker image uses: docker/build-push-action@v6 with: @@ -80,4 +90,4 @@ jobs: tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} build-args: | - VERSION=${{ steps.meta.outputs.version }} + VERSION=${{ steps.version.outputs.version }}