We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dfc80de commit 65db8c9Copy full SHA for 65db8c9
1 file changed
.github/workflows/docker-build.yml
@@ -53,17 +53,17 @@ jobs:
53
username: ${{ github.actor }}
54
password: ${{ secrets.GITHUB_TOKEN }}
55
56
- # 构建镜像,如果是main或master分支则同时推送
57
- - name: Build and push Docker image
+ # 只构建本地镜像,不推送
+ - name: Build Docker image
58
uses: docker/build-push-action@v5
59
with:
60
context: .
61
file: ./Dockerfile
62
- # 只有推送到main或master分支时才推送镜像
63
- push: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' }}
64
- # 构建时使用本地标签,推送时使用ghcr.io标签
+ # 明确不推送镜像
+ push: false
+ # 使用localhost前缀的本地标签,避免Docker尝试推送到docker.io
65
tags: |
66
- encryption-service:local
+ localhost/encryption-service:local
67
cache-from: type=local,src=/tmp/.buildx-cache
68
cache-to: type=local,dest=/tmp/.buildx-cache,mode=max
69
build-args: |
0 commit comments