Martin Dimitrov fcb741f11b
Some checks failed
Reload Act Runner Stack to clear cache for workflows / diff (push) Successful in 24s
Reload Act Runner Stack to clear cache for workflows / deploy-gitainer (push) Has been skipped
Reload Act Runner Stack to clear cache for workflows / notify (push) Failing after 1m0s
fix tag error
2026-03-06 12:37:30 -08:00

40 lines
1.1 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:
context: workflow
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 }}