Skip to content

Commit

Permalink
fix: build to aliyun acr
Browse files Browse the repository at this point in the history
  • Loading branch information
JingYiJun committed Jun 12, 2024
1 parent 4c3cd5a commit 21b6e5d
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@master

- name: Login to DockerHub
uses: docker/login-action@master
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Login to ACR
uses: aliyun/acr-login@master
with:
Expand All @@ -38,8 +32,21 @@ jobs:
with:
push: true
tags: |
registry.cn-shanghai.aliyuncs.com/${{ secrets.ACR_NAMESPACE }}/${{ env.APP_NAME }}:latest
registry.cn-shanghai.aliyuncs.com/${{ secrets.ACR_NAMESPACE }}/${{ env.APP_NAME }}:master
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.APP_NAME }}:latest
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.APP_NAME }}:master
- name: Login to DockerHub
uses: docker/login-action@master
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
id: docker_build
uses: docker/build-push-action@master
with:
push: true
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.APP_NAME }}:latest
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.APP_NAME }}:master

0 comments on commit 21b6e5d

Please sign in to comment.