From 77084866a73f5abdc66fbbbde571afc2c37e1f55 Mon Sep 17 00:00:00 2001 From: bitxeno <137328844+bitxeno@users.noreply.github.com> Date: Tue, 25 Jun 2024 14:04:15 +0800 Subject: [PATCH] ci: fix push dockerhub --- .github/workflows/release-nightly.yml | 17 ++++++++++------- .github/workflows/release.yml | 13 ++++++++----- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release-nightly.yml b/.github/workflows/release-nightly.yml index 98d68c1..36cffe0 100644 --- a/.github/workflows/release-nightly.yml +++ b/.github/workflows/release-nightly.yml @@ -119,8 +119,11 @@ jobs: with: name: ${{needs.build.outputs.APP_NAME}} path: build + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 - name: Login to DockerHub - if: ${{ steps.vars.outputs.HAS_DOCKER_TOKEN }} uses: docker/login-action@v2 with: username: ${{ secrets.DOCKER_USERNAME }} @@ -131,13 +134,12 @@ jobs: with: images: ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_REPOSITORY }} - name: Build and push Docker images to DockerHub - if: ${{ steps.vars.outputs.HAS_DOCKER_TOKEN }} uses: docker/build-push-action@v5 with: context: . push: true provenance: false - platforms: linux/amd64 + platforms: linux/amd64,linux/arm64 tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} build-args: | @@ -161,9 +163,10 @@ jobs: with: name: ${{needs.build.outputs.APP_NAME}} path: build - - name: Display structure of downloaded files - run: ls -R - working-directory: build + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 - name: Login to GitHub Container Registry uses: docker/login-action@v2 with: @@ -181,7 +184,7 @@ jobs: context: . push: true provenance: false - platforms: linux/amd64 + platforms: linux/amd64,linux/arm64 tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} build-args: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9bfd6de..838742b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -138,8 +138,11 @@ jobs: with: name: ${{needs.build.outputs.APP_NAME}} path: build + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 - name: Login to DockerHub - if: ${{ steps.vars.outputs.HAS_DOCKER_TOKEN }} uses: docker/login-action@v2 with: username: ${{ secrets.DOCKER_USERNAME }} @@ -150,7 +153,6 @@ jobs: with: images: ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_REPOSITORY }} - name: Build and push Docker images to DockerHub - if: ${{ steps.vars.outputs.HAS_DOCKER_TOKEN }} uses: docker/build-push-action@v5 with: context: . @@ -180,9 +182,10 @@ jobs: with: name: ${{needs.build.outputs.APP_NAME}} path: build - - name: Display structure of downloaded files - run: ls -R - working-directory: build + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 - name: Login to GitHub Container Registry uses: docker/login-action@v2 with: