Skip to content

Commit aff82e7

Browse files
authored
feat: 同时将镜像推送到国内阿里仓库,解决镜像下载问题 (#50)
1 parent 52777ad commit aff82e7

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

.github/workflows/docker-image.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,21 @@ jobs:
5858
# 给清单打上多个标签
5959
tags: |
6060
eryajf/go-ldap-admin-ui:${{ steps.date.outputs.today }}
61-
eryajf/go-ldap-admin-ui:latest
61+
eryajf/go-ldap-admin-ui:latest
62+
# 镜像推送到 阿里云仓库
63+
- name: Login to the Ali Registry
64+
uses: docker/login-action@v2
65+
with:
66+
registry: registry.cn-hangzhou.aliyuncs.com
67+
username: ${{ secrets.ALIHUB_USERNAME }}
68+
password: ${{ secrets.ALIHUB_TOKEN }}
69+
70+
- name: Build and push to Ali
71+
uses: docker/build-push-action@v3
72+
with:
73+
context: .
74+
push: true
75+
platforms: linux/amd64,linux/arm64
76+
tags: |
77+
registry.cn-hangzhou.aliyuncs.com/${{ secrets.ALIHUB_USERNAME }}/go-ldap-admin-ui:${{ env.GITHUB_REF_NAME }}
78+
registry.cn-hangzhou.aliyuncs.com/${{ secrets.ALIHUB_USERNAME }}/go-ldap-admin-ui:latest

0 commit comments

Comments
 (0)