Add optional external checkout inputs to docker-build-publish workflow
This commit is contained in:
40
.github/workflows/docker-build-publish.yml
vendored
40
.github/workflows/docker-build-publish.yml
vendored
@@ -10,6 +10,35 @@ on:
|
|||||||
required: true
|
required: true
|
||||||
type: string
|
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:
|
registry_host:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
@@ -53,6 +82,17 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
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
|
- name: Load env vars
|
||||||
if: ${{ inputs.env != '' }}
|
if: ${{ inputs.env != '' }}
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user