Skip to content

Commit

Permalink
Trying a change
Browse files Browse the repository at this point in the history
  • Loading branch information
Soren Ptak committed Jul 20, 2023
1 parent 09157a0 commit af771bc
Showing 1 changed file with 23 additions and 20 deletions.
43 changes: 23 additions & 20 deletions executable-monitor/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,24 +45,27 @@ runs:
run: |
# Run Executable with Monitoring
echo "::group::Executable Output"
echo "inputs.success-exit-status: ${{ inputs.success-exit-status }} | inputs.success-line: ${{ inputs.success-line }}"
if [ ( "${{ inputs.success-exit-status }}" = "" ) && ( "${{ inputs.success-line }}" = "" ) ]; then
echo "::endgroup::""
echo -e "\033[32;31mDid not supply an input of success-line or success-exit-status to search for\033[0m"
exit 1
elif [ "${{ inputs.success-exit-status }}" = "" ]; then
python3 $GITHUB_ACTION_PATH/executable-monitor.py --exe-path=${{ inputs.exe-path }} --timeout-seconds=${{ inputs.timeout-seconds }} --success-line="${{ inputs.success-line }}" --log-dir=${{ inputs.log-dir }} --retry-attempts=${{ inputs.retry-attempts }}
elif [ "${{ inputs.success-line }}" = "" ]; then
python3 $GITHUB_ACTION_PATH/executable-monitor.py --exe-path=${{ inputs.exe-path }} --timeout-seconds=${{ inputs.timeout-seconds }} --success-exit-status=${{ inputs.success-exit-status }} --log-dir=${{ inputs.log-dir }} --retry-attempts=${{ inputs.retry-attempts }
else
python3 $GITHUB_ACTION_PATH/executable-monitor.py --exe-path=${{ inputs.exe-path }} --timeout-seconds=${{ inputs.timeout-seconds }} --success-line="${{ inputs.success-line }}" --success-exit-status=${{ inputs.success-exit-status }} --log-dir=${{ inputs.log-dir }} --retry-attempts=${{ inputs.retry-attempts }
fi
echo "::endgroup::"
if [ "$?" = "0" ]; then
echo -e "\033[32;3mValid exit status found\033[0m"
exit 0
else
echo -e "\033[32;31mDid not find a valid exit condition\033[0m"
exit 1
fi
echo ${{ inputs.success-exit-status }}
echo ${{ inputs.success-line }}
echo "::endgroup::""
python3 $GITHUB_ACTION_PATH/executable-monitor.py --exe-path=${{ inputs.exe-path }} --timeout-seconds=${{ inputs.timeout-seconds }} --success-line="${{ inputs.success-line }}" --log-dir=${{ inputs.log-dir }} --retry-attempts=${{ inputs.retry-attempts }
# if [ ( "${{ inputs.success-exit-status }}" = "" ) && ( "${{ inputs.success-line }}" = "" ) ]; then
# echo "::endgroup::""
# echo -e "\033[32;31mDid not supply an input of success-line or success-exit-status to search for\033[0m"
# exit 1
# elif [ "${{ inputs.success-exit-status }}" = "" ]; then
# python3 $GITHUB_ACTION_PATH/executable-monitor.py --exe-path=${{ inputs.exe-path }} --timeout-seconds=${{ inputs.timeout-seconds }} --success-line="${{ inputs.success-line }}" --log-dir=${{ inputs.log-dir }} --retry-attempts=${{ inputs.retry-attempts }}
# elif [ "${{ inputs.success-line }}" = "" ]; then
# python3 $GITHUB_ACTION_PATH/executable-monitor.py --exe-path=${{ inputs.exe-path }} --timeout-seconds=${{ inputs.timeout-seconds }} --success-exit-status=${{ inputs.success-exit-status }} --log-dir=${{ inputs.log-dir }} --retry-attempts=${{ inputs.retry-attempts }
# else
# python3 $GITHUB_ACTION_PATH/executable-monitor.py --exe-path=${{ inputs.exe-path }} --timeout-seconds=${{ inputs.timeout-seconds }} --success-line="${{ inputs.success-line }}" --success-exit-status=${{ inputs.success-exit-status }} --log-dir=${{ inputs.log-dir }} --retry-attempts=${{ inputs.retry-attempts }
# fi
# echo "::endgroup::"
# if [ "$?" = "0" ]; then
# echo -e "\033[32;3mValid exit status found\033[0m"
# exit 0
# else
# echo -e "\033[32;31mDid not find a valid exit condition\033[0m"
# exit 1
# fi
shell: bash

0 comments on commit af771bc

Please sign in to comment.