build(docker): multi-platform, any branch

This commit is contained in:
Isaac 2023-06-05 16:54:02 +01:00
parent a3ae81ee77
commit c3ec1ce20d
No known key found for this signature in database
GPG Key ID: 0DE40AE37BBA5C33

View File

@ -2,10 +2,10 @@ name: Publish Docker image
on:
push:
branches:
- 'main'
tags:
- 'v*'
# branches:
# - 'main'
# tags:
# - 'v*'
pull_request:
branches:
- 'main'
@ -21,6 +21,12 @@ jobs:
- name: Check out the repo
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
@ -53,6 +59,7 @@ jobs:
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}