File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,8 +3,6 @@ name: Docker Image CI
33on :
44 push :
55 branches : ["**"]
6- pull_request :
7- branches : ["master"]
86 workflow_dispatch :
97
108jobs :
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'
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 }}
You can’t perform that action at this time.
0 commit comments