Skip to content

Commit 9f4d527

Browse files
committed
made ref overridable for external repos
1 parent 1687d24 commit 9f4d527

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/stackhpc-all-in-one.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,18 @@ on:
6363
description: Git version of https://github.com/stackhpc/stackhpc-cloud-tests to use for testing
6464
type: string
6565
default: main
66+
called_from_external:
67+
description: Set if using the workflow from an external repository
68+
type: boolean
69+
default: false
6670
repository:
6771
description: SKC repository to checkout (convenience for CI)
6872
type: string
6973
default: ${{ github.repository }}
74+
external_ref_override:
75+
description: Git ref to checkout, only used if called_from_external is true
76+
type: string
77+
default: ${{ github.ref }}
7078
secrets:
7179
KAYOBE_VAULT_PASSWORD:
7280
required: true
@@ -103,7 +111,7 @@ jobs:
103111
uses: actions/checkout@v4
104112
with:
105113
repository: ${{ inputs.repository }}
106-
ref: ${{ inputs.upgrade && env.PREVIOUS_BRANCH || github.ref }}
114+
ref: ${{ inputs.upgrade && env.PREVIOUS_BRANCH || inputs.called_from_external && inputs.external_ref_override || github.ref }}
107115
submodules: true
108116

109117
- name: Output Kayobe image

0 commit comments

Comments
 (0)