Skip to content

Commit

Permalink
Enable pushing to ghcr.io on merge to master
Browse files Browse the repository at this point in the history
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
  • Loading branch information
mikkeloscar committed Oct 10, 2023
1 parent a66ce04 commit 5775096
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/gh-packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ permissions: {}

on:
push:
branches:
- master
tags:
- '*'

Expand Down Expand Up @@ -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 }}

0 comments on commit 5775096

Please sign in to comment.