Skip to content

Commit

Permalink
feat: 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 47102a3 commit 4c3cd5a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,21 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Login to ACR
uses: aliyun/acr-login@master
with:
login-server: https://registry.cn-shanghai.aliyuncs.com
username: ${{ secrets.ACR_USERNAME }}
password: ${{ secrets.ACR_PASSWORD }}

- name: Build and push
id: docker_build
uses: docker/build-push-action@master
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

0 comments on commit 4c3cd5a

Please sign in to comment.