diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 608a968e..fa8ac764 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -327,10 +327,25 @@ jobs: - name: Build env: VERSION: ${{ needs.get-release.outputs.tag_name }} - run: | - tag=liwei2633/gopeed:${VERSION:1} - docker build -t $tag . - docker login -u liwei2633 -p ${{ secrets.DOCKER_PASSWORD }} - docker push $tag - docker tag $tag liwei2633/gopeed:latest - docker push liwei2633/gopeed:latest + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: liwei2633 + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Build and push + uses: docker/build-push-action@v2 + env: + VERSION: ${{ needs.get-release.outputs.tag_name }} + with: + push: true + platforms: | + linux/386 + linux/amd64 + linux/arm64 + tags: | + liwei2633:latest + liwei2633:${{ env.VERSION }}