Skip to content

Commit

Permalink
ADD:增加阿里镜像源
Browse files Browse the repository at this point in the history
  • Loading branch information
ShilongLee committed Jul 15, 2024
1 parent 2cf5c25 commit 09c4235
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,18 @@ jobs:
docker tag shilongli0101/crawler:latest $IMAGE_NAME_DATE
docker push $IMAGE_NAME
docker push $IMAGE_NAME_DATE
- name: Log in to Ali Container Registry
run: echo "${{ secrets.ALI_DOCKER_PASSWORD }}" | docker login registry.cn-hangzhou.aliyuncs.com -u ${{ secrets.ALI_DOCKER_USERNAME }} --password-stdin

- name: Tag and Push Docker image to Ali Container Registry
run: |
DATE_TAG=$(date +%Y%m%d)
IMAGE_NAME=registry.cn-hangzhou.aliyuncs.com/${{ github.repository_owner }}/crawler:latest
IMAGE_NAME=$(echo $IMAGE_NAME | tr '[A-Z]' '[a-z]')
IMAGE_NAME_DATE=registry.cn-hangzhou.aliyuncs.com/${{ github.repository_owner }}/crawler:$DATE_TAG
IMAGE_NAME_DATE=$(echo $IMAGE_NAME_DATE | tr '[A-Z]' '[a-z]')
docker tag shilongli0101/crawler:latest $IMAGE_NAME
docker tag shilongli0101/crawler:latest $IMAGE_NAME_DATE
docker push $IMAGE_NAME
docker push $IMAGE_NAME_DATE

0 comments on commit 09c4235

Please sign in to comment.