Martin Dimitrov 17744df2d7
Some checks failed
Reload Act Runner Stack to clear cache for workflows / diff (push) Successful in 1m21s
Reload Act Runner Stack to clear cache for workflows / deploy-gitainer (push) Failing after 4s
Reload Act Runner Stack to clear cache for workflows / notify (push) Has been skipped
keep dry and upgrade the latest workflows
2026-03-06 12:01:44 -08:00

39 lines
1.0 KiB
YAML

name: 'Docker Build and Push'
description: 'Extracts metadata and builds/pushes a Docker image'
inputs:
registry_image:
description: 'The registry and image name to tag (e.g., ghcr.io/user/repo)'
required: true
file:
description: 'Path to the Dockerfile'
required: false
default: 'Dockerfile'
platforms:
description: 'Comma-separated list of platforms to build for'
required: false
default: 'linux/amd64'
context:
description: 'Build context path'
required: false
default: '.'
runs:
using: "composite"
steps:
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v6
with:
images: ${{ inputs.registry_image }}
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: ${{ inputs.context }}
file: ${{ inputs.file }}
platforms: ${{ inputs.platforms }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}