From 53ad363f91e80f4978f9819806bda37806936aac Mon Sep 17 00:00:00 2001 From: Weihan Li Date: Mon, 26 Feb 2024 14:18:16 +0800 Subject: [PATCH] feat: update docker container platforms --- .github/workflows/docker.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index adebfed..95e6e1d 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -14,20 +14,23 @@ on: - 'src/**' - 'build/**' - '.github/workflows/docker.yml' +env: + # ContainerPlatforms: "linux/amd64,linux/arm64,linux/arm" + ContainerPlatforms: "linux/amd64" jobs: docker-build: if: github.repository == 'WeihanLi/dotnet-exec' runs-on: ubuntu-latest steps: - - name: Check Out + - name: Check Out 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 Docker Hub uses: docker/login-action@v3 with: @@ -43,7 +46,7 @@ jobs: file: ./Dockerfile push: true tags: ${{ secrets.DOCKER_HUB_USERNAME }}/dotnet-exec:${{ github.event.release.tag_name }} - platforms: linux/amd64,linux/arm + platforms: "$ContainerPlatforms" - name: Build and push web release id: docker_build_web_release @@ -54,8 +57,7 @@ jobs: file: ./Dockerfile.web push: true tags: ${{ secrets.DOCKER_HUB_USERNAME }}/dotnet-exec:${{ github.event.release.tag_name }}-web - multiPlatform: true - platform: linux/amd64,linux/arm + platforms: "$ContainerPlatforms" - name: Build and push web id: docker_build_web @@ -65,7 +67,7 @@ jobs: file: ./Dockerfile.web push: true tags: ${{ secrets.DOCKER_HUB_USERNAME }}/dotnet-exec:web - platforms: linux/amd64,linux/arm + platforms: "$ContainerPlatforms" - name: Build and push latest id: docker_build_latest @@ -75,5 +77,5 @@ jobs: context: ./ file: ./Dockerfile push: true - tags: ${{ secrets.DOCKER_HUB_USERNAME }}/dotnet-exec:latest - platforms: linux/amd64,linux/arm + tags: ${{ secrets.DOCKER_HUB_USERNAME }}/dotnet-exec:latest + platforms: "$ContainerPlatforms"