Skip to content

Commit

Permalink
feat: update docker container platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
WeihanLi committed Feb 26, 2024
1 parent 4b7c3ba commit 53ad363
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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"

0 comments on commit 53ad363

Please sign in to comment.