v1.8.0 #21
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
release: | |
types: [published] | |
name: Docker Image | |
jobs: | |
publish: | |
name: build and push | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Build, tag, and push | |
env: | |
DOCKER_HUB_REPO: nanmu42/orly | |
ALICLOUD_REPO: registry.cn-hongkong.aliyuncs.com/nanmu42/orly | |
IMAGE_TAG: ${{ github.ref_name }} | |
DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} | |
DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }} | |
ALICLOUD_USER: ${{ secrets.ALICLOUD_USER }} | |
ALICLOUD_PASSWORD: ${{ secrets.ALICLOUD_PASSWORD }} | |
run: | | |
docker login --username $DOCKER_HUB_USER -p $DOCKER_HUB_PASSWORD | |
docker login --username $ALICLOUD_USER -p $ALICLOUD_PASSWORD registry.cn-hongkong.aliyuncs.com | |
docker build -t $DOCKER_HUB_REPO:$IMAGE_TAG . | |
docker tag $DOCKER_HUB_REPO:$IMAGE_TAG $ALICLOUD_REPO:$IMAGE_TAG | |
docker push $DOCKER_HUB_REPO:$IMAGE_TAG | |
docker push $ALICLOUD_REPO:$IMAGE_TAG |