Skip to content

Commit

Permalink
build arm and amd image in same step
Browse files Browse the repository at this point in the history
  • Loading branch information
Øyvind Hatland committed Oct 18, 2023
1 parent 5fa9082 commit 005b4c2
Showing 1 changed file with 2 additions and 33 deletions.
35 changes: 2 additions & 33 deletions .github/workflows/docker-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- 'v[0-9]+.[0-9]+.[0-9]+'

jobs:
build-image-for-amd:
build-image:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -31,38 +31,7 @@ jobs:
with:
context: .
push: true
platforms: linux/amd64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max

build-image-for-mac:
runs-on: ubuntu-latest
steps:
- name: Checkout
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 Github
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ secrets.USERNAME }}
password: ${{ secrets.TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/brreg/brok
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/arm64
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
Expand Down

0 comments on commit 005b4c2

Please sign in to comment.