Skip to content
Snippets Groups Projects

fix: rework the status reporting to github

Merged Wouter Deconinck requested to merge wdconinc-master-patch-98887 into master
+ 12
13
@@ -43,16 +43,15 @@ benchmarks:detector:pending:
@@ -43,16 +43,15 @@ benchmarks:detector:pending:
script:
script:
- |
- |
if [ -n "${GITHUB_SHA}" ] ; then
if [ -n "${GITHUB_SHA}" ] ; then
echo https://api.github.com/repos/${GITHUB_REPOSITORY}/statuses/${GITHUB_SHA}
curl \
curl \
-X POST \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Accept: application/vnd.github+json" \
-H "Authorization: token ${GITHUB_REPO_STATUS_TOKEN}" \
-H "Authorization: token ${GITHUB_REPO_STATUS_TOKEN}" \
https://api.github.com/repos/${GITHUB_REPOSITORY}/statuses/${GITHUB_SHA} \
"https://api.github.com/repos/${GITHUB_REPOSITORY}/statuses/${GITHUB_SHA}" \
-d '{"state":"pending", \
-d '{"state":"pending",
"target_url":"${CI_PIPELINE_URL}", \
"target_url":"'"${CI_PIPELINE_URL}"'",
"description":"The detector benchmarks are running...", \
"description":"The detector benchmarks are running...",
"context":"eicweb/detector_benchmarks" \
"context":"eicweb/detector_benchmarks"
}' ;
}' ;
fi
fi
@@ -161,13 +160,13 @@ benchmarks:detector:success:
@@ -161,13 +160,13 @@ benchmarks:detector:success:
if [ -n "${GITHUB_SHA}" ] ; then
if [ -n "${GITHUB_SHA}" ] ; then
curl \
curl \
-X POST \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Accept: application/vnd.github+json" \
-H "Authorization: token ${GITHUB_REPO_STATUS_TOKEN}" \
-H "Authorization: token ${GITHUB_REPO_STATUS_TOKEN}" \
https://api.github.com/repos/${GITHUB_REPOSITORY}/statuses/${GITHUB_SHA} \
"https://api.github.com/repos/${GITHUB_REPOSITORY}/statuses/${GITHUB_SHA}" \
-d '{"state":"success", \
-d '{"state":"success",
"target_url":"${CI_PIPELINE_URL}", \
"target_url":"'"${CI_PIPELINE_URL}"'",
"description":"The detector benchmarks succeeded!", \
"description":"The detector benchmarks succeeded!",
"context":"eicweb/detector_benchmarks" \
"context":"eicweb/detector_benchmarks"
}' ;
}' ;
fi
fi
Loading