From c8b2abc110059d71b400aec30e3746b11c1b342d Mon Sep 17 00:00:00 2001 From: Sean Sube Date: Tue, 10 Jan 2023 19:27:22 -0600 Subject: [PATCH] feat(build): add github status jobs (fixes #28) --- .gitlab-ci.yml | 26 ++++++++++++++++++++++++++ common/scripts/github-status.sh | 19 +++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100755 common/scripts/github-status.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1e086c93..9cb4c642 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -70,6 +70,7 @@ build-gui-bundle: - cd gui - make ci +# packages, various .package-api-oci: extends: - .build-oci @@ -146,6 +147,7 @@ package-gui-oci-node-buster: IMAGE_ARCH: node-buster IMAGE_FILE: Containerfile.node.buster +# language-specific packages package-api-twine: extends: - .build-node @@ -171,3 +173,27 @@ package-gui-npm: script: - cd gui - npm publish + +# commit status +github-pending: + stage: status-pre + extends: + - .build-curl + script: + - ./common/scripts/github-status.sh pending + +github-failure: + stage: status-post + extends: + - .build-curl + when: on_failure + script: + - ./common/scripts/github-status.sh failure + +github-success: + stage: status-post + extends: + - .build-curl + when: on_success + script: + - ./common/scripts/github-status.sh success diff --git a/common/scripts/github-status.sh b/common/scripts/github-status.sh new file mode 100755 index 00000000..a0db255d --- /dev/null +++ b/common/scripts/github-status.sh @@ -0,0 +1,19 @@ +#! /bin/sh + +STATUS="${1}" +CI_COMMIT_SHA="${CI_COMMIT_SHA:-$(git rev-parse HEAD)}" + +STATUS_BODY="$(cat <