Skip to content

Commit 0806a30

Browse files
committed
Add custom CLI branch input to amd8 workflow
1 parent 56a6273 commit 0806a30

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

.github/workflows/current-amd8-daily-build-devel.yml

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ on:
2121
- main
2222
- v25_STABLE
2323
- REL24_10
24+
- custom
25+
26+
custom_cli_branch:
27+
description: "If 'custom' selected above, provide cli branch name"
28+
required: false
29+
type: string
2430

2531
component:
2632
description: "Spock in-dev component to additionally build (e.g. spock60)"
@@ -116,7 +122,20 @@ jobs:
116122
echo "Clean flag is disabled"
117123
fi
118124
119-
SELECTED_CLI_BRANCH="${{ inputs.cli_branch }}"
125+
# If custom cli branch is chosen, set the branch provided in text field (cannot be empty)
126+
# otherwise set it to selection from the drop down.
127+
if [[ "${{ inputs.cli_branch }}" == "custom" ]]; then
128+
if [[ -z "${{ inputs.custom_cli_branch }}" ]]; then
129+
echo "Error: custom CLI branch selected but no branch name provided."
130+
exit 1
131+
fi
132+
SELECTED_CLI_BRANCH="${{ inputs.custom_cli_branch }}"
133+
echo "Manual run: Using custom CLI branch: $SELECTED_CLI_BRANCH"
134+
else
135+
SELECTED_CLI_BRANCH="${{ inputs.cli_branch }}"
136+
echo "Manual run: Using CLI branch: $SELECTED_CLI_BRANCH"
137+
fi
138+
120139
COMPONENT="${{ inputs.component }}"
121140
BRANCH="${{ inputs.branch }}"
122141
echo "Manual run: Component=$COMPONENT, Branch=$BRANCH, CLI Branch=$SELECTED_CLI_BRANCH"
@@ -175,7 +194,10 @@ jobs:
175194
git stash push -u -m "Temp stash for current build" || true
176195
177196
echo "Switching to branch: $CLI_BRANCH"
178-
git checkout "$CLI_BRANCH" || true
197+
if ! git checkout "$CLI_BRANCH"; then
198+
echo "Error: Invalid CLI branch name provided: $CLI_BRANCH"
199+
exit 1
200+
fi
179201
echo "Branch checkout completed"
180202
181203
# Execute the build script and collect artifacts into src/ and bin/

0 commit comments

Comments
 (0)