Skip to content

Commit 6a7f1dd

Browse files
authored
Update entrypoint.sh
1 parent 2e4df1e commit 6a7f1dd

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

entrypoint.sh

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,6 @@ PLANSHOME="${HOME}/testground/plans"
77
SUCCESS=0
88
FAILURE=1
99

10-
# For github to collect the action output, use these strings:
11-
# Note that if you echo these strings, they will not be visible in the action log.
12-
OUTPUT_STATUS="::set-output name=status::"
13-
OUTPUT_OUTCOME="::set-output name=outcome::"
14-
OUTPUT_ID="::set-output name=testground_id::"
15-
1610
BACKEND="${INPUT_BACKEND_PROTO}"'://'"${INPUT_BACKEND_ADDR}"
1711

1812
# Make sure the input files exist.
@@ -41,11 +35,11 @@ TGID=$(awk '/run is queued with ID/ {print $10}' <run.out)
4135
# Make sure the we received a run ID
4236
if [ -z "$TGID" ]
4337
then
44-
echo "${OUTPUT_OUTCOME}failure/not_queued"
38+
echo "outcome=failure/not_queued" >> $GITHUB_OUTPUT
4539
exit "${FAILURE}"
4640
fi
4741

48-
echo "${OUTPUT_ID}${TGID}"
42+
echo "testground_id=${TGID}" >> $GITHUB_OUTPUT
4943

5044
echo "Got testground ID ${TGID}"
5145
echo -n "Testground started: "; date
@@ -56,7 +50,7 @@ do
5650
sleep 120
5751
status=$(/testground --endpoint "${BACKEND}" status -t "${TGID}" | awk '/Status/ {print $2}')
5852
echo "last polled status is ${status}"
59-
echo "${OUTPUT_STATUS}${status}"
53+
echo "status=${status}" >> $GITHUB_OUTPUT
6054
done
6155

6256
echo -n "Testground ended: "; date
@@ -75,7 +69,7 @@ extstatus=$(echo "${extstatus}" | tr -d "[:cntrl:]" | sed 's/\[0m//g')
7569
# job was canceled before it began for some reason.
7670
if [ "${extstatus}" == "null" ]
7771
then
78-
echo "${OUTPUT_OUTCOME}failure/canceled"
72+
echo "outcome=failure/canceled" >> $GITHUB_OUTPUT
7973
exit "$FAILURE"
8074
fi
8175

@@ -86,6 +80,6 @@ outcome=$(echo "${extstatus}" | jq ".outcome")
8680

8781
echo "the extended status was ${extstatus}"
8882
echo "The outcome of this test was ${outcome}"
89-
echo "${OUTPUT_OUTCOME}${outcome}"
83+
echo "outcome=${outcome}" >> $GITHUB_OUTPUT
9084

9185
test "${outcome}" = "\"success\"" && exit "${SUCCESS}" || exit "${FAILURE}"

0 commit comments

Comments
 (0)