优化 Docker 镜像构建工作流:新增小写图像名称设置,确保一致性

This commit is contained in:
2026-04-06 14:28:37 +08:00
parent 93630a821d
commit 7cfb5c7457
+4 -1
View File
@@ -26,11 +26,14 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Set lowercase image name
run: echo "IMAGE_NAME=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ghcr.io/${{ github.repository }}:latest
tags: ghcr.io/${{ env.IMAGE_NAME }}:latest
cache-from: type=gha
cache-to: type=gha,mode=max