Skip to content

Commit 17744ca

Browse files
committed
8291444: GHA builds/tests won't run manually if disabled from automatic running
Backport-of: 5c0ff26f321ad36daa34bfc5b2d013b6c4a03810
1 parent 4c5dd40 commit 17744ca

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

.github/workflows/main.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -71,19 +71,17 @@ jobs:
7171
# 'false' otherwise.
7272
# arg $1: platform name or names to look for
7373
function check_platform() {
74-
if [[ '${{ !secrets.JDK_SUBMIT_FILTER || startsWith(github.ref, 'refs/heads/submit/') }}' == 'false' ]]; then
75-
# If JDK_SUBMIT_FILTER is set, and this is not a "submit/" branch, don't run anything
76-
echo 'false'
77-
return
78-
fi
79-
8074
if [[ $GITHUB_EVENT_NAME == workflow_dispatch ]]; then
8175
input='${{ github.event.inputs.platforms }}'
8276
elif [[ $GITHUB_EVENT_NAME == push ]]; then
83-
input='${{ secrets.JDK_SUBMIT_PLATFORMS }}'
84-
else
85-
echo 'Internal error in GHA'
86-
exit 1
77+
if [[ '${{ !secrets.JDK_SUBMIT_FILTER || startsWith(github.ref, 'refs/heads/submit/') }}' == 'false' ]]; then
78+
# If JDK_SUBMIT_FILTER is set, and this is not a "submit/" branch, don't run anything
79+
>&2 echo 'JDK_SUBMIT_FILTER is set and not a "submit/" branch'
80+
echo 'false'
81+
return
82+
else
83+
input='${{ secrets.JDK_SUBMIT_PLATFORMS }}'
84+
fi
8785
fi
8886
8987
normalized_input="$(echo ,$input, | tr -d ' ')"

0 commit comments

Comments
 (0)