A simple, copylefted, lightweight library to work with command-line arguments in Python
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

24 lines
795 B

#!/bin/sh
# This script is based on the one located here: https://codeberg.org/gitnex/GitNex/src/branch/main/scripts/add-commit-status.sh
# The original script is released under the GNU General Public License, version 3 and is authored by opyale.
# For legal reasons, this file is NOT under LGPLv3, but under GPLv3. https://www.gnu.org/licenses/gpl-3.0.html
context="GitLab CI Bridge"
description="$MESSAGE"
ci_state="$STATE"
target_url="${CI_PIPELINE_URL}"
body='
{
"context": "'$context'",
"description": "'$description'",
"state": "'$ci_state'",
"target_url": "'$target_url'"
}
'
curl --request POST \
--data "$body" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
"${INSTANCE}/api/v1/repos/${MAIN_REPO}/statuses/${CI_COMMIT_SHA}?token=${GITEA_SECRET}"