Add optional external checkout inputs to docker-build-publish workflow

This commit is contained in:
2026-03-26 14:07:28 +01:00
parent e94e04cff3
commit 011bc1c113

View File

@@ -10,6 +10,35 @@ on:
required: true
type: string
checkout_repo:
description: >
Optional external repo to checkout (owner/name). If set, repo is checked out
into checkout_path.
required: false
type: string
default: ""
checkout_ref:
description: >
Optional git ref (branch/tag/SHA) for checkout_repo. Defaults to repo default branch.
required: false
type: string
default: ""
checkout_path:
description: >
Path to checkout checkout_repo into.
required: false
type: string
default: "external-src"
checkout_fetch_depth:
description: >
Fetch depth for checkout_repo (0 = full history).
required: false
type: string
default: "0"
registry_host:
required: true
type: string
@@ -53,6 +82,17 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Checkout external repository
if: ${{ inputs.checkout_repo != '' }}
uses: actions/checkout@v4
with:
repository: ${{ inputs.checkout_repo }}
ref: ${{ inputs.checkout_ref }}
server-url: ${{ github.server_url }}
token: ${{ secrets.ci_token }}
path: ${{ inputs.checkout_path }}
fetch-depth: ${{ inputs.checkout_fetch_depth }}
- name: Load env vars
if: ${{ inputs.env != '' }}
run: |