Skip to content

Commit c080dea

Browse files
authored
feat(release-container): allow pushing default branch (#110)
1 parent ecae3f2 commit c080dea

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

.github/workflows/release-container.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ on:
5454
required: false
5555
default: ''
5656
type: string
57+
push-default-branch:
58+
description: 'Push the default branch (typically `main`) to the rgistry.'
59+
required: false
60+
default: false
61+
type: boolean
5762

5863
jobs:
5964
docker:
@@ -184,7 +189,7 @@ jobs:
184189
context: ${{ inputs.context }}
185190
file: ${{ inputs.dockerfile }}
186191
platforms: linux/amd64
187-
push: ${{ github.event_name != 'pull_request' && startsWith(github.event.ref, 'refs/tags/v') }}
192+
push: ${{ github.event_name != 'pull_request' && (startsWith(github.event.ref, 'refs/tags/v') || $inputs.push-default-branch && github.event.ref_name == github.event.repository.default_branch) }}
188193
tags: ${{ steps.meta.outputs.tags }}
189194
cache-from: type=gha
190195
build-args: ${{ inputs.build-args }}

0 commit comments

Comments
 (0)