piilloparametrit eksplisiittisiksi
CI / load-config (push) Successful in 12s
ci-bats Bats tests
ci-cucumber Cucumber tests passed
ci-build Build complete
CI / feature (push) Successful in 1m24s
CI / main (push) Has been skipped

This commit is contained in:
moilanik
2026-06-13 16:21:47 +03:00
parent a80731a162
commit 0655372a86
7 changed files with 90 additions and 95 deletions
+15 -7
View File
@@ -1,19 +1,27 @@
#!/usr/bin/env bash
set -euo pipefail
[ -z "${GITEA_API_URL:-}" ] && echo "ERROR: GITEA_API_URL is not set" >&2 && exit 1
[ -z "${GITEA_TOKEN:-}" ] && echo "ERROR: GITEA_TOKEN is not set" >&2 && exit 1
STATE="${1:-}"
DESCRIPTION="${2:-}"
URL="${3:-}"
KEY="${4:-commit-${GITHUB_SHA:0:8}}"
ROOT_COMMIT="${5:-}"
ROOT_REPO="${6:-}"
GITEA_API_URL="${4:-}"
GITEA_TOKEN="${5:-}"
KEY="${6:-commit-${GITHUB_SHA:0:8}}"
PAGES_HOST="${7:-}"
REPORT_PATH="${8:-}"
ROOT_COMMIT="${9:-}"
ROOT_REPO="${10:-}"
[ -z "$STATE" ] && echo "ERROR: state argument is required" >&2 && exit 1
[ -z "$DESCRIPTION" ] && echo "ERROR: description argument is required" >&2 && exit 1
[ -z "$URL" ] && echo "ERROR: url argument is required" >&2 && exit 1
[ -z "$GITEA_API_URL" ] && echo "ERROR: gitea_api_url argument is required" >&2 && exit 1
[ -z "$GITEA_TOKEN" ] && echo "ERROR: gitea_token argument is required" >&2 && exit 1
if [ -n "$REPORT_PATH" ]; then
URL="https://${PAGES_HOST}/${GITHUB_REPOSITORY}/reports/${GITHUB_SHA:0:8}/${REPORT_PATH}"
elif [ -n "$PAGES_HOST" ]; then
URL="${GITEA_API_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
fi
if [ -n "$ROOT_COMMIT" ] && [ -n "$ROOT_REPO" ]; then
REPO="$ROOT_REPO"