This repository was archived by the owner on Dec 10, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 1919 - name : Checkout repository
2020 uses : actions/checkout@v4
2121 with :
22- fetch-depth : 0 # get full history to create short-commit-ids
22+ fetch-depth : 0 # Fetch all history for tags
23+
24+ - name : Get short commit hash
25+ id : short_sha
26+ run : echo "SHORT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
2327
2428 - name : Log in to the Container registry
2529 uses : docker/login-action@v2
@@ -35,14 +39,13 @@ jobs:
3539 images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
3640 tags : |
3741 ${{ github.ref == 'refs/heads/master' && 'latest' || '' }}
38- ${{ github.ref_type == 'tag' && github.ref_name || format('{0}-{1}', github.head_ref || github.ref_name, github.sha ) }}
42+ ${{ github.ref_type == 'tag' && github.ref_name || format('{0}-{1}', github.head_ref || github.ref_name, steps.short_sha.outputs.SHORT_SHA ) }}
3943 labels : |
4044 org.label-schema.schema-version=1.0
4145 org.label-schema.vcs-url=${{ github.server_url }}/${{ github.repository }}
4246 org.label-schema.vcs-ref=${{ github.sha }}
4347 org.label-schema.build-date=${{ github.event.push.head_commit.timestamp }}
4448
45-
4649 - name : Build and push Docker image
4750 uses : docker/build-push-action@v4
4851 with :
You can’t perform that action at this time.
0 commit comments