Skip to content

Commit 8b1c869

Browse files
committed
调整 action 配置
1 parent 1e0ab67 commit 8b1c869

File tree

1 file changed

+8
-16
lines changed

1 file changed

+8
-16
lines changed

.github/workflows/build-docker-image.yml

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,14 @@ jobs:
5050
with:
5151
username: eryajf
5252
password: ${{ secrets.DOCKERHUB_TOKEN }}
53+
54+
# 镜像推送到 阿里云仓库
55+
- name: Login to the Ali Registry
56+
uses: docker/login-action@v2
57+
with:
58+
registry: registry.cn-hangzhou.aliyuncs.com
59+
username: eryajf
60+
password: ${{ secrets.ALIHUB_TOKEN }}
5361

5462
- name: Build and push
5563
uses: docker/build-push-action@v4
@@ -64,21 +72,5 @@ jobs:
6472
tags: |
6573
eryajf/cloud_dns_exporter:latest
6674
eryajf/cloud_dns_exporter:${{ steps.date.outputs.today }}
67-
68-
# 镜像推送到 阿里云仓库
69-
- name: Login to the Ali Registry
70-
uses: docker/login-action@v2
71-
with:
72-
registry: registry.cn-hangzhou.aliyuncs.com
73-
username: eryajf
74-
password: ${{ secrets.ALIHUB_TOKEN }}
75-
76-
- name: Build and push to Ali
77-
uses: docker/build-push-action@v3
78-
with:
79-
context: .
80-
push: true
81-
platforms: linux/amd64,linux/arm64
82-
tags: |
8375
registry.cn-hangzhou.aliyuncs.com/eryajf/cloud_dns_exporter:${{ env.GITHUB_REF_NAME }}
8476
registry.cn-hangzhou.aliyuncs.com/eryajf/cloud_dns_exporter:latest

0 commit comments

Comments
 (0)