From 79f2a6cb62c75d1c023fb0ed481174f3247b1127 Mon Sep 17 00:00:00 2001 From: Nicolai Ort Date: Wed, 10 May 2023 19:37:18 +0200 Subject: [PATCH] use fallback instead of failing --- plugin.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugin.sh b/plugin.sh index 8a757ef..8d7f091 100644 --- a/plugin.sh +++ b/plugin.sh @@ -15,9 +15,12 @@ if [[ "${PLUGIN_GITEA_DOMAIN:-}" == "true" ]]; then echo "No api key provided"; exit 1; fi + if [[ -n "${PLUGIN_REPO:-}"]]; then + PLUGIN_REPO=$CI_REPO_NAME + fi curl --request POST \ - --url "https://$PLUGIN_GITEA_DOMAIN/api/v1/repos/$CI_REPO_NAME/releases" \ + --url "https://$PLUGIN_GITEA_DOMAIN/api/v1/repos/$PLUGIN_REPO/releases" \ --header "Content-Type: application/json" \ --header "Authorization: token $PLUGIN_GITEA_APIKEY" \ --data "{