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