From 225bd5d25b7cf24e6b025b0bd5fd437203b4f484 Mon Sep 17 00:00:00 2001 From: "Quentin McGaw (desktop)" Date: Thu, 21 Oct 2021 13:46:50 +0000 Subject: [PATCH] Fix: CI to use short commits --- .github/workflows/ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8fba1322..fd5cb626 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -120,6 +120,10 @@ jobs: type=semver,pattern=v{{major}},enable=${{ startsWith(steps.semvercheck.outputs.match, 'true_nonzero') }} type=raw,value=latest,enable=${{ !startsWith(steps.semvercheck.outputs.match, 'true') }} + - name: Short commit + id: shortcommit + run: echo "::set-output name=value::$(git rev-parse --short HEAD)" + - name: Build and push final image uses: docker/build-push-action@v2.7.0 with: @@ -127,7 +131,7 @@ jobs: labels: ${{ steps.meta.outputs.labels }} build-args: | CREATED=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }} - COMMIT=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }} + COMMIT=${{ steps.shortcommit.outputs.value }} VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }} tags: ${{ steps.meta.outputs.tags }} push: true