Skip to content
Snippets Groups Projects
Commit 10be92ab authored by Wouter Deconinck's avatar Wouter Deconinck
Browse files

fix(ci): don't run status jobs when GITHUB_SHA undefined

parent 0dc289b2
No related branches found
No related tags found
1 merge request!342fix(ci): don't run status jobs when GITHUB_SHA undefined
Pipeline #122808 passed with warnings
...@@ -40,21 +40,21 @@ stages: ...@@ -40,21 +40,21 @@ stages:
.status: .status:
image: curlimages/curl:latest image: curlimages/curl:latest
rules:
- if: $GITHUB_SHA !~ /^$/ # when GITHUB_SHA non-empty
before_script: [] before_script: []
script: script:
- | - |
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":"'"${STATE}"'",
-d '{"state":"'"${STATE}"'", "target_url":"'"${CI_PIPELINE_URL}"'",
"target_url":"'"${CI_PIPELINE_URL}"'", "description":"'"${DESCRIPTION} $(TZ=America/New_York date)"'",
"description":"'"${DESCRIPTION} $(TZ=America/New_York date)"'", "context":"eicweb/reconstruction_benchmarks ('"${BENCHMARKS_TAG}"', '"$DETECTOR_CONFIG"')"
"context":"eicweb/reconstruction_benchmarks ('"${BENCHMARKS_TAG}"', '"$DETECTOR_CONFIG"')" }' ;
}' ;
fi
benchmarks:reconstruction:pending: benchmarks:reconstruction:pending:
stage: status-pending stage: status-pending
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment