Skip to content

Commit

Permalink
chore: check for valid version input in PiT actions (#7136)
Browse files Browse the repository at this point in the history
Co-authored-by: Zhe Sun <31067185+ZheSun88@users.noreply.github.com>
  • Loading branch information
manolo and ZheSun88 authored Dec 20, 2024
1 parent f727f18 commit 4ff10b8
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/pit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,20 @@ jobs:
# COMPUTE MATRIX
echo "Computing matrix ..."
[ -z "${{secrets.GHTK}}" -o -z "${{secrets.TB_LICENSE}}" -o -z "${{secrets.SS_LICENSE}}" -o -z "${{secrets.CE_LICENSE}}" ] && exit 1
echo "${{inputs.version}}" | grep -Eqv '^[0-9]+(\.[0-9]+)*(-SNAPSHOT|\.alpha[0-9]+|\.beta[0-9]+|\.rc[0-9]+)?$' && echo "Invalid version" && exit 1
git clone -q https://${{secrets.GHTK}}@github.com/vaadin/platform-in-test-script.git pit
V="${{inputs.version}}"
W="${{inputs.windows}}"
L="${{inputs.linux}}"
[ true != "$W" -a true != "$L" ] && W=true
[ true != "$L" -a true != "$W" ] && L=true
A="$A --starters=${{inputs.starters}}"
[ true = "${{inputs.generated}}" ] && A="$A --generated"
[ true = "${{inputs.demos}}" ] && A="$A --demos"
S=`./pit/scripts/pit/run.sh $A --list=${{inputs.join}}`
cmd="./pit/scripts/pit/run.sh $A --list=${{inputs.join}}"
echo "Generating list of starters: $cmd"
S=`eval $cmd`
M='{"include":['
for i in `echo $S`; do
J='{"app":"'$i'"'
Expand All @@ -81,7 +86,7 @@ jobs:
[ true = "$L" ] && M=$M$J',"os":"ubuntu-22.04"},'
done
M=`echo $M | sed -e s/,$//`']}'
echo "$M"
echo "Generated Matrix: $M"
echo "matrix=$M" >> $GITHUB_OUTPUT
run:
needs: prepare
Expand Down

0 comments on commit 4ff10b8

Please sign in to comment.