Skip to content

Commit

Permalink
check string
Browse files Browse the repository at this point in the history
  • Loading branch information
andromaqui committed Feb 27, 2024
1 parent 300ad28 commit 827f597
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions .github/workflows/rerun-failed-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,9 @@ jobs:
gh config set pager cat
logs=$(gh run view ${{ inputs.run_id }} -R ${{ inputs.repository }} --exit-status || true)
echo "Logs coming from run with id: ${{ inputs.run_id }}"
echo "Inputted error message: ${{ inputs.error_message }}"
errors='${{ inputs.error_message }}'
readarray -t array < <(echo "$errors" | jq -r '.[]')
readarray -t array < <(echo '$errors' | jq -r '.[]')
for error in "${array[@]}";
do
echo "error: $error"
Expand All @@ -58,13 +57,6 @@ jobs:
echo "error_no_quotes: $error_no_quotes"
error_count=$(echo "$logs" | grep -c "some random string")
echo "error_count: $error_count"
if [ "$error_count" -gt 0 ]; then
echo "rerun=true" >> "$GITHUB_OUTPUT"
echo "Error message $error_no_quotes found in logs so the previous run has finished with that error."
else
echo "rerun=false" >> "$GITHUB_OUTPUT"
echo "Error message $error_no_quotes not found in logs"
fi
done
- name: Rerun run with id ${{ inputs.run_id }} for ${{ inputs.repository }} repository
Expand Down

0 comments on commit 827f597

Please sign in to comment.