Skip to content

Commit

Permalink
Build containers for both amd64 and arm64 platforms
Browse files Browse the repository at this point in the history
Build and push containers for both of the popular platforms: amd64 and
arm64.
  • Loading branch information
masih committed Sep 5, 2023
1 parent b4d5457 commit 2527856
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/container-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@ jobs:
uses: docker/build-push-action@v3
with:
context: .
push: false
push: false
cache-from: type=gha,scope=${GITHUB_REF_NAME}
cache-to: type=gha,mode=max,scope=${GITHUB_REF_NAME}
14 changes: 13 additions & 1 deletion .github/workflows/container-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,18 @@ jobs:
permissions:
contents: read
packages: write
strategy:
matrix:
platform:
- linux/amd64
- linux/arm64
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
platforms: ${{ matrix.platform }}
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
Expand All @@ -42,4 +51,7 @@ jobs:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
labels: ${{ steps.meta.outputs.labels }}
platforms: ${{ matrix.platform }}
cache-from: type=gha,scope=${GITHUB_REF_NAME}
cache-to: type=gha,mode=max,scope=${GITHUB_REF_NAME}

0 comments on commit 2527856

Please sign in to comment.