siivous: scriptit env-pohjaisiksi, validointi, siistit kutsut
CI / load-config (push) Successful in 11s
ci-bats Bats tests
ci-cucumber Cucumber tests passed
ci-build Build complete
CI / feature (push) Successful in 1m22s
CI / main (push) Has been skipped

This commit is contained in:
moilanik
2026-06-13 16:49:37 +03:00
parent 0655372a86
commit f8535718c2
9 changed files with 159 additions and 129 deletions
+10 -20
View File
@@ -3,33 +3,23 @@ set -euo pipefail
STATE="${1:-}"
DESCRIPTION="${2:-}"
URL="${3:-}"
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:-}"
KEY="${3:-commit-${GITHUB_SHA:0:8}}"
SUITE="${4:-}"
[ -z "$STATE" ] && echo "ERROR: state argument is required" >&2 && exit 1
[ -z "$DESCRIPTION" ] && echo "ERROR: description 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
[ -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
if [ -n "$REPORT_PATH" ]; then
URL="https://${PAGES_HOST}/${GITHUB_REPOSITORY}/reports/${GITHUB_SHA:0:8}/${REPORT_PATH}"
elif [ -n "$PAGES_HOST" ]; then
if [ -n "$SUITE" ]; then
SUITE="${SUITE%/}/"
URL="https://${PAGES_HOST}/${GITHUB_REPOSITORY}/reports/${GITHUB_SHA:0:8}/${SUITE}"
else
URL="${GITEA_API_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
fi
if [ -n "$ROOT_COMMIT" ] && [ -n "$ROOT_REPO" ]; then
REPO="$ROOT_REPO"
COMMIT="$ROOT_COMMIT"
else
REPO="${GITHUB_REPOSITORY:-}"
COMMIT="${GITHUB_SHA:-}"
fi
REPO="${ROOT_REPO:-${GITHUB_REPOSITORY:-}}"
COMMIT="${ROOT_COMMIT:-${GITHUB_SHA:-}}"
[ -z "$REPO" ] && echo "ERROR: GITHUB_REPOSITORY is not set" >&2 && exit 1
[ -z "$COMMIT" ] && echo "ERROR: GITHUB_SHA is not set" >&2 && exit 1