Only build arm64 docker images on push (#589)

* Only build ARM on push to main

* changelog

* Add concurrency, fix tertary

* Divide up push jobs

* Try it again

* String false

* 'true'
This commit is contained in:
Will Hunt 2022-12-07 17:12:26 +00:00 committed by GitHub
parent f7ccacb429
commit 07e4129156
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -7,7 +7,8 @@ on:
env:
DOCKER_NAMESPACE: halfshot
PLATFORMS: linux/amd64,linux/arm64
PLATFORMS: linux/amd64
PLATFORMS_PUSH: linux/amd64,linux/arm64
# Only push if this is main, otherwise we just want to build
PUSH: ${{ github.ref == 'refs/heads/main' }}
@ -31,7 +32,7 @@ jobs:
with:
context: .
file: ./Dockerfile
platforms: ${{ env.PLATFORMS }}
platforms: ${{ (env.PUSH == 'true' && env.PLATFORMS_PUSH) || env.PLATFORMS }}
push: ${{ env.PUSH }}
tags: |
${{ env.DOCKER_NAMESPACE }}/matrix-hookshot:latest

1
changelog.d/589.misc Normal file
View File

@ -0,0 +1 @@
Only build ARM images when merging or releasing, due to slow ARM build times.