Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ on:
pull_request:
branches:
- main
workflow_dispatch:
inputs:
push:
description: 'Push the built image to the registry'
type: boolean
required: false
default: true

env:
REGISTRY: ghcr.io
Expand All @@ -32,7 +39,7 @@ jobs:
uses: docker/setup-buildx-action@v3

- name: Log in to Container Registry
if: github.event_name != 'pull_request'
if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.push)
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
Expand All @@ -58,7 +65,7 @@ jobs:
with:
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
push: ${{ github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.push) }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
Expand Down
Loading
Loading