Skip to content

Commit

Permalink
chore: add aliyun docker hub (apache#881)
Browse files Browse the repository at this point in the history
  • Loading branch information
chunshao90 authored May 10, 2023
1 parent d898869 commit 61e4b7c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/dockerhub-publish-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ jobs:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Aliyun Docker Hub
uses: docker/login-action@v2
with:
registry: registry.cn-hangzhou.aliyuncs.com
username: ${{ secrets.ALIYUN_DOCKERHUB_USERNAME }}
password: ${{ secrets.ALIYUN_DOCKERHUB_TOKEN }}
- name: Set Environment Variables
run: |
echo "BUILD_DATE=$(TZ=':Asia/Shanghai' date '+%Y%m%d')" >> $GITHUB_ENV
Expand All @@ -36,4 +42,6 @@ jobs:
with:
context: .
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:nightly-${{ env.BUILD_DATE }}-${{ env.SHORT_SHA }}
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:nightly-${{ env.BUILD_DATE }}-${{ env.SHORT_SHA }}
registry.cn-hangzhou.aliyuncs.com/ceresdb/ceresdb-server:nightly-${{ env.BUILD_DATE }}-${{ env.SHORT_SHA }}
10 changes: 9 additions & 1 deletion .github/workflows/dockerhub-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,17 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to Aliyun Docker Hub
uses: docker/login-action@v2
with:
registry: registry.cn-hangzhou.aliyuncs.com
username: ${{ secrets.ALIYUN_DOCKERHUB_USERNAME }}
password: ${{ secrets.ALIYUN_DOCKERHUB_TOKEN }}
- name: Build and Push CeresDB Server Docker Image
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: ceresdb/ceresdb-server:latest,ceresdb/ceresdb-server:${{github.ref_name}}
tags: |
ceresdb/ceresdb-server:latest,ceresdb/ceresdb-server:${{github.ref_name}}
registry.cn-hangzhou.aliyuncs.com/ceresdb/ceresdb-server:${{github.ref_name}}

0 comments on commit 61e4b7c

Please sign in to comment.