chromart-gitea-actions/.gitea/workflows/docker-publish-ghcr.yaml
Martin Dimitrov 1f18b78e1b
All checks were successful
Reload Act Runner Stack to clear cache for workflows / diff (push) Successful in 25s
Reload Act Runner Stack to clear cache for workflows / reload-primary (push) Successful in 14s
Reload Act Runner Stack to clear cache for workflows / wait-for-primary-death (push) Successful in 32s
Reload Act Runner Stack to clear cache for workflows / reload-secondary (push) Successful in 3s
Reload Act Runner Stack to clear cache for workflows / wait-for-secondary-death (push) Successful in 31s
Reload Act Runner Stack to clear cache for workflows / pull-cache-secondary (push) Successful in 2s
add submodule strategy
2026-06-30 18:02:43 -07:00

67 lines
1.9 KiB
YAML

name: Docker Publish GHCR
on:
workflow_call:
inputs:
repository:
required: false
type: string
default: ${{ github.repository }}
ref:
required: false
type: string
default: ${{ github.ref }}
image_name:
required: true
type: string
file:
required: false
type: string
default: 'Dockerfile'
platforms:
required: false
type: string
default: 'linux/amd64'
submodules:
description: 'Submodule checkout strategy (true, false, or recursive)'
required: false
default: 'false'
type: string
jobs:
docker:
runs-on: ubuntu-22.04
steps:
- name: Echo test
run: echo "${{ inputs.image_name }}"
- name: Checkout Code to Build
uses: actions/checkout@v4
with:
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref }}
token: ${{ github.token }}
submodules: ${{ inputs.submodules }}
- name: Setup Docker (QEMU, Buildx)
uses: https://gitea.chromart.cc/martin/chromart-gitea-actions/.gitea/actions/docker-setup@main
- name: Load Infisical Secrets
uses: https://gitea.chromart.cc/martin/chromart-gitea-actions/.gitea/actions/infisical-secrets@main
- name: Log in to the Container registry
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: Build and push Docker image
uses: https://gitea.chromart.cc/martin/chromart-gitea-actions/.gitea/actions/docker-build-push@main
with:
registry_image: ghcr.io/${{ inputs.image_name }}
file: ${{ inputs.file }}
platforms: ${{ inputs.platforms }}
context: .