Skip to content

Commit 6b236ca

Browse files
committed
Even more docker image tag shenanigans
1 parent ef26550 commit 6b236ca

1 file changed

Lines changed: 4 additions & 10 deletions

File tree

.github/workflows/docker.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ name: Docker Image CI
33
on:
44
push:
55
branches: ["**"]
6-
pull_request:
7-
branches: ["master"]
86
workflow_dispatch:
97

108
jobs:
@@ -36,13 +34,8 @@ jobs:
3634
id: version
3735
run: |
3836
VERSION=$(jq -r '.version' package.json)
39-
GIT_TAG=$(git describe --exact-match --tags HEAD 2>/dev/null || echo "")
40-
if [ -z "$GIT_TAG" ]; then
41-
VERSION_TAG="${VERSION}-dirty"
42-
else
43-
VERSION_TAG="${VERSION}"
44-
fi
45-
echo "version_tag=${VERSION_TAG}" >> $GITHUB_OUTPUT
37+
echo "version_tag=${VERSION}" >> $GITHUB_OUTPUT
38+
echo "short_sha=${GITHUB_SHA::7}" >> $GITHUB_OUTPUT
4639
4740
- name: Build and push (master)
4841
if: github.ref == 'refs/heads/master'
@@ -63,4 +56,5 @@ jobs:
6356
push: true
6457
platforms: linux/amd64,linux/arm64
6558
tags: |
66-
ghcr.io/${{ env.IMAGE_NAME }}:nightly-${{ github.sha }}
59+
ghcr.io/${{ env.IMAGE_NAME }}:${{ github.ref_name }}
60+
ghcr.io/${{ env.IMAGE_NAME }}:${{ github.ref_name }}-${{ steps.version.outputs.short_sha }}

0 commit comments

Comments
 (0)