File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -95,14 +95,20 @@ jobs:
9595 fi
9696
9797 run_url="https://github.com/${REPOSITORY}/actions/runs/${RUN_ID}"
98- payload =$(cat <<EOF
99- {
100- "text": ":warning: Fresh Install Tests failed in *${REPOSITORY}* on branch *${BRANCH}*.\n* Workflow:* ${WORKFLOW}\n*Run:* <${run_url}|#${RUN_NUMBER} (attempt ${RUN_ATTEMPT})>\n*Failed step:* ${failed_step}"
101- }
102- EOF
103- )
98+ message =$(printf '%s\n%s\n%s\n%s' \
99+ ":warning: Fresh Install Tests failed in *${REPOSITORY}* on branch *${BRANCH}*." \
100+ "* Workflow:* ${WORKFLOW}" \
101+ "*Run:* <${run_url}|#${RUN_NUMBER} (attempt ${RUN_ATTEMPT})>" \
102+ "*Failed step:* ${failed_step}")
103+ payload=$(jq --compact-output --null-input --arg text "$message" '{text: $text}' )
104104
105105 curl -sS -X POST \
106+ --fail \
107+ --retry 4 \
108+ --retry-all-errors \
109+ --retry-max-time 60 \
110+ --connect-timeout 10 \
111+ --max-time 30 \
106112 -H "Content-type: application/json" \
107113 --data "$payload" \
108114 "$SLACK_WEBHOOK_URL"
You can’t perform that action at this time.
0 commit comments