Skip to content

Commit

Permalink
build: 增加 dockerhub 和 阿里云发布渠道
Browse files Browse the repository at this point in the history
  • Loading branch information
CaoMeiYouRen committed Sep 24, 2024
1 parent 88336ba commit 8148181
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,27 +63,26 @@ jobs:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# - name: Login to Docker Hub
# uses: docker/login-action@v3
# with:
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}
# - name: Login to Alibaba Cloud Container Registry
# uses: docker/login-action@v3
# with:
# registry: registry.cn-hangzhou.aliyuncs.com
# username: ${{ secrets.ALIYUN_USERNAME }}
# password: ${{ secrets.ALIYUN_PASSWORD }}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to Alibaba Cloud Container Registry
uses: docker/login-action@v3
with:
registry: registry.cn-hangzhou.aliyuncs.com
username: ${{ secrets.ALIYUN_USERNAME }}
password: ${{ secrets.ALIYUN_PASSWORD }}
- name: Extract Docker metadata
id: metadata
uses: docker/metadata-action@v5
with:
# 发布到 docker.io / ghcr.io / registry.cn-hangzhou.aliyuncs.com
# ${{ github.repository }}
# ghcr.io/${{ github.repository }}
# registry.cn-hangzhou.aliyuncs.com/${{ github.repository }}
images: |
${{ github.repository }}
ghcr.io/${{ github.repository }}
registry.cn-hangzhou.aliyuncs.com/${{ github.repository }}
tags: |
type=raw,value=latest,enable=true
type=raw,value={{date 'YYYY-MM-DD' tz='Asia/Shanghai'}},enable=true
Expand Down

0 comments on commit 8148181

Please sign in to comment.