Enable pushing to ghcr.io on merge to master (#625)

Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
This commit is contained in:
Mikkel Oscar Lyderik Larsen
2023-10-12 16:02:54 +02:00
committed by GitHub
parent 7c1339a6f2
commit e54f3b88cf

View File

@ -3,6 +3,8 @@ permissions: {}
on:
push:
branches:
- master
tags:
- '*'
@ -73,6 +75,17 @@ jobs:
context: .
build-args: BASE_IMAGE=alpine:3
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
push: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/v') }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
# Build and push latest tag
- name: Build and push latest
uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825
with:
context: .
build-args: BASE_IMAGE=alpine:3
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
labels: ${{ steps.meta.outputs.labels }}