lint(scripts): make github status body readable
This commit is contained in:
parent
65f9bb2db6
commit
e6688b7f97
|
@ -3,7 +3,15 @@
|
|||
STATUS="${1}"
|
||||
CI_COMMIT_SHA="${CI_COMMIT_SHA:-$(git rev-parse HEAD)}"
|
||||
|
||||
STATUS_BODY="{\"state\": \"${STATUS}\", \"target_url\": \"${CI_PIPELINE_URL}\", \"description\": \"CI pipeline ${STATUS}!\", \"context\": \"gitlab/build\"}"
|
||||
STATUS_BODY="$(cat <<EOF
|
||||
{
|
||||
"state": "${STATUS}",
|
||||
"target_url": "${CI_PIPELINE_URL}",
|
||||
"description": "CI pipeline ${STATUS}!",
|
||||
"context": "gitlab/build"
|
||||
}
|
||||
EOF
|
||||
)"
|
||||
|
||||
printf "Reporting status for %s...\n%s" "${CI_COMMIT_SHA}" "${STATUS_BODY}"
|
||||
printf "%s" "${STATUS_BODY}" | curl -d @- \
|
||||
|
|
Loading…
Reference in New Issue