Skip to content

Commit

Permalink
Always build docker but only push on main branch
Browse files Browse the repository at this point in the history
  • Loading branch information
hughns committed Jan 17, 2025
1 parent 4cb7566 commit 1ebefdd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: Build and publish Docker image

on:
push:
branches: [main]

env:
REGISTRY: ghcr.io
Expand Down Expand Up @@ -50,7 +49,7 @@ jobs:
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
push: ${{github.ref == 'refs/heads/main'}} # only push on main branch
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
Expand Down

0 comments on commit 1ebefdd

Please sign in to comment.