From 011bc1c113eed50c5b2edfed023991e5fc17ba96 Mon Sep 17 00:00:00 2001 From: estebanthi Date: Thu, 26 Mar 2026 14:07:28 +0100 Subject: [PATCH] Add optional external checkout inputs to docker-build-publish workflow --- .github/workflows/docker-build-publish.yml | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/.github/workflows/docker-build-publish.yml b/.github/workflows/docker-build-publish.yml index 3af21c9..279ae7d 100644 --- a/.github/workflows/docker-build-publish.yml +++ b/.github/workflows/docker-build-publish.yml @@ -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: |