Skip to content

Commit

Permalink
Add arm64 support (#22)
Browse files Browse the repository at this point in the history
* Add arm64 support

We're trying out AWS' gravitons, and I've noticed that the image is only
build for amd64.

While testing build on my fork I could not push without permissions:
block I've added currently.

* Revert "Add arm64 support"

This reverts commit a9da0fb.

* Add arm64 build step to pipeline
  • Loading branch information
ivankovnatsky authored Sep 14, 2023
1 parent 1a5f353 commit 99b1cbe
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion .github/workflows/build-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ on:
description: 'Go version'
required: true

permissions:
contents: read
id-token: write
packages: write

jobs:
changes:
if: ${{ github.repository == 'danfromtitan/envars-from-node-labels' }}
Expand Down Expand Up @@ -88,11 +93,34 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- uses: docker/build-push-action@v3
id: docker-build
id: docker-build-amd
with:
context: ./
platforms: linux/amd64
outputs: type=docker,push=false
tags: ${{ steps.docker-tags.outputs.tags }}
labels: ${{ steps.docker-tags.outputs.labels }}

- run: |
export GOARCH=arm64
make envars-webhook
- uses: docker/build-push-action@v3
id: docker-build-arm
with:
context: ./
platforms: linux/arm64
outputs: type=docker,push=false
tags: ${{ steps.docker-tags.outputs.tags }}
labels: ${{ steps.docker-tags.outputs.labels }}

- uses: docker/build-push-action@v3
id: docker-build
with:
context: ./
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
outputs: type=image,push=true
tags: ${{ steps.docker-tags.outputs.tags }}
labels: ${{ steps.docker-tags.outputs.labels }}

Expand Down

0 comments on commit 99b1cbe

Please sign in to comment.