功能(.github/workflows/docker-publish.yml):给Docker镜像添加latest标签

♻️ 重构(.github/workflows/docker-publish.yml):使用版本标签替换latest标签以检查镜像
This commit is contained in:
shitao 2024-01-14 13:35:16 +08:00
parent 7e40abe53a
commit 2d80524c59

View File

@ -46,6 +46,7 @@ jobs:
platforms: ${{ matrix.platform }}
labels: ${{ steps.meta.outputs.labels }}
outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true
tags: ${{ env.REGISTRY_IMAGE }}:latest
- name: Export digest
run: |
mkdir -p /tmp/digests
@ -89,4 +90,4 @@ jobs:
$(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)
- name: Inspect image
run: |
docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:latest
docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }}