From fb7201dc2d2855d24babbe7e3af84c94119ce1d7 Mon Sep 17 00:00:00 2001 From: Louis King Date: Sat, 6 Dec 2025 16:37:25 +0000 Subject: [PATCH] Updates --- .github/workflows/docker.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 7f5c36d..d8b10e3 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -49,10 +49,6 @@ jobs: type=semver,pattern={{major}}.{{minor}} type=sha - - name: Get version from Git - id: version - run: echo "version=$(git describe --tags --always --dirty)" >> $GITHUB_OUTPUT - - name: Build and push Docker image uses: docker/build-push-action@v5 with: @@ -63,14 +59,13 @@ jobs: tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} build-args: | - SETUPTOOLS_SCM_PRETEND_VERSION=${{ steps.version.outputs.version }} + SETUPTOOLS_SCM_PRETEND_VERSION=${{ startsWith(github.ref, 'refs/tags/v') && github.ref_name || format('0.0.0.dev0+g{0}', github.sha) }} cache-from: type=gha cache-to: type=gha,mode=max - name: Test Docker image if: github.event_name == 'pull_request' run: | - VERSION=$(git describe --tags --always --dirty) - docker build -t meshcore-hub-test --build-arg SETUPTOOLS_SCM_PRETEND_VERSION=$VERSION -f Dockerfile . + docker build -t meshcore-hub-test --build-arg SETUPTOOLS_SCM_PRETEND_VERSION=0.0.0.dev0+g${{ github.sha }} -f Dockerfile . docker run --rm meshcore-hub-test --version docker run --rm meshcore-hub-test --help