Repository navigation
Build and Push Docker Image #131
This file contains hidden or 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
| 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 |