Skip to content

Commit

Permalink
Use shared 'scripts' folder (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
dbarbuzzi authored Sep 24, 2024
1 parent 226cf71 commit 3b77d67
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
19 changes: 5 additions & 14 deletions actions/testmo-run-submit-thread/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ outputs:
runs:
using: composite
steps:
- name: add scripts folder to PATH
run: echo "${{ github.action_path }}/../../scripts" >> $GITHUB_PATH
shell: bash

- id: submit_thread
run: |
# verify there are result files to be submitted
Expand All @@ -42,19 +46,6 @@ runs:
REPORT=0
fi
step_status() {
# echo "green encased checkmark" if "${1} == 0"
# echo "red X" if "${1} != 0"
if [ "$1" -eq 0 ]; then
# green check
echo -e "\xE2\x9C\x85"
else
# red x
echo -e "\xE2\x9D\x8C"
fi
}
# submit results
SUCCESS=0
if [ ${REPORT} -eq 1 ]; then
Expand All @@ -65,7 +56,7 @@ runs:
--instance ${TESTMO_URL} \
--run-id ${TESTMO_RUN_ID} \
--results ${RESULTS} \
-- step_status "${{ inputs.step_status }}" || SUCCESS=$?
-- step-status.sh "${{ inputs.step_status }}" || SUCCESS=$?
fi
echo "status=${SUCCESS}" >> "$GITHUB_OUTPUT"
exit ${SUCCESS}
Expand Down
12 changes: 12 additions & 0 deletions scripts/step-status.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash

# echo "green encased checkmark" if "${1} == 0"
# echo "red X" if "${1} != 0"

if [ "$1" -eq 0 ]; then
# green check
echo -e "\xE2\x9C\x85"
else
# red x
echo -e "\xE2\x9D\x8C"
fi

0 comments on commit 3b77d67

Please sign in to comment.