keep dry and upgrade the latest workflows
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

This commit is contained in:
Martin Dimitrov 2026-03-06 12:01:44 -08:00
parent 047239c8f0
commit 17744df2d7
4 changed files with 60 additions and 34 deletions

View File

@ -0,0 +1,38 @@
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 }}

View File

@ -0,0 +1,11 @@
name: 'Docker Setup'
description: 'Sets up QEMU and Docker Buildx for multi-platform builds'
runs:
using: "composite"
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

View File

@ -35,36 +35,24 @@ jobs:
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: Setup Docker (QEMU, Buildx)
uses: martin/chromart-gitea-actions/.gitea/actions/docker-setup@main
- name: Load Infisical Secrets
uses: martin/chromart-gitea-actions/.gitea/actions/infisical-secrets@main
- name: Log in to the Container registry
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
registry: ghcr.io
username: martindmtrv
# The Infisical secrets action needs to provide a secret named GHCR_PAT
password: ${{ env.GHCR_PAT }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v6
with:
# image_name should be formatted like: user/repo
images: ghcr.io/${{ inputs.image_name }}
- name: Build and push Docker image
uses: docker/build-push-action@v6
uses: martin/chromart-gitea-actions/.gitea/actions/docker-build-push@main
with:
context: .
registry_image: ghcr.io/${{ inputs.image_name }}
file: ${{ inputs.file }}
platforms: ${{ inputs.platforms }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
context: .

View File

@ -33,24 +33,13 @@ jobs:
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: Setup Docker (QEMU, Buildx)
uses: martin/chromart-gitea-actions/.gitea/actions/docker-setup@main
- name: Build and push Docker image
uses: docker/build-push-action@v6
uses: martin/chromart-gitea-actions/.gitea/actions/docker-build-push@main
with:
context: .
registry_image: 192.168.1.150:9120/${{ inputs.image_name }}
file: ${{ inputs.file }}
platforms: ${{ inputs.platforms }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
context: .