Skip to content

Build and Push Docker Image #131

Build and Push Docker Image

Build and Push Docker Image #131

Workflow file for this run

name: Build and Push Docker Image
on:
workflow_run:
workflows: ["Sync Version"]
types:
- completed
workflow_dispatch: {}
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Alibaba Cloud Registry
uses: docker/login-action@v3
with:
registry: ${{ secrets.ALIYUN_DOCKER_REGISTRY_ENTRY }}
username: ${{ secrets.ALIYUN_DOCKER_USERNAME }}
password: ${{ secrets.ALIYUN_DOCKER_PASSWD }}
- name: Get and Set Version
run: |
echo "VERSION=$(<version)" >> $GITHUB_ENV
# - name: Build and push
# uses: docker/build-push-action@v5
# with:
# push: true
# tags: registry.cn-hangzhou.aliyuncs.com/${{ secrets.DOCKERHUB_USERNAME }}/tooldelta:${{ env.VERSION }}
- name: Build and push
uses: docker/build-push-action@v5
with:
push: true
tags: ${{ secrets.ALIYUN_DOCKER_REGISTRY_ENTRY }}/tooldelta/tooldelta:latest