File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : " Release Docker images"
22
33on :
4+ workflow_dispatch :
45 push :
56 branches : ["main"]
67 tags :
@@ -128,6 +129,14 @@ jobs:
128129 - name : Set up Docker Buildx
129130 uses : docker/setup-buildx-action@v3
130131
132+ - name : Push SHA tag (workflow_dispatch only)
133+ if : github.event_name == 'workflow_dispatch'
134+ working-directory : ${{ runner.temp }}/digests
135+ run : |
136+ SHORT_SHA="sha-$(echo ${{ github.sha }} | cut -c1-7)"
137+ docker buildx imagetools create -t ${{ env.REGISTRY_IMAGE }}:$SHORT_SHA \
138+ $(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)
139+
131140 - name : Snapshot metadata
132141 if : github.ref == 'refs/heads/main'
133142 uses : docker/metadata-action@v5
@@ -150,6 +159,7 @@ jobs:
150159 type=raw,value=${{ env.MAJOR }}
151160
152161 - name : Create manifest list and push
162+ if : github.event_name != 'workflow_dispatch'
153163 working-directory : ${{ runner.temp }}/digests
154164 run : |
155165 docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
You can’t perform that action at this time.
0 commit comments