chromart-gitea-actions/.gitea/workflows/docker-publish-private.yaml
Martin Dimitrov 047239c8f0
Some checks failed
Reload Act Runner Stack to clear cache for workflows / diff (push) Successful in 1m22s
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
add multi platform setup
2026-03-06 11:57:18 -08:00

57 lines
1.3 KiB
YAML

name: Docker Publish Private
on:
workflow_call:
inputs:
repository:
required: true
type: string
ref:
required: true
type: string
image_name:
required: true
type: string
file:
required: false
type: string
default: 'Dockerfile'
platforms:
required: false
type: string
default: 'linux/amd64'
secrets: []
jobs:
docker:
runs-on: ubuntu-22.04
steps:
- name: Checkout Code to Build
uses: actions/checkout@v4
with:
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref }}
token: ${{ github.token }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v6
with:
images: 192.168.1.150:9120/${{ inputs.image_name }}
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
file: ${{ inputs.file }}
platforms: ${{ inputs.platforms }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}