修正 Release Cleanup action 與 Gitea workflow 設定 #3
+1
-1
@@ -12,5 +12,5 @@ runs:
|
|||||||
env:
|
env:
|
||||||
GITEA_SERVER_URL: ${{ gitea.server_url }}
|
GITEA_SERVER_URL: ${{ gitea.server_url }}
|
||||||
GITEA_REPOSITORY: ${{ gitea.repository }}
|
GITEA_REPOSITORY: ${{ gitea.repository }}
|
||||||
RUNNER_TOKEN: ${{ gitea.token }}
|
GITEA_TOKEN: ${{ gitea.token }}
|
||||||
KEEP_COUNT: ${{ inputs.keep_count }}
|
KEEP_COUNT: ${{ inputs.keep_count }}
|
||||||
|
|||||||
+5
-5
@@ -79,17 +79,17 @@ require_value "GITEA_REPOSITORY" "$GITEA_REPOSITORY"
|
|||||||
require_value "KEEP_COUNT" "$KEEP_COUNT"
|
require_value "KEEP_COUNT" "$KEEP_COUNT"
|
||||||
require_integer "KEEP_COUNT" "$KEEP_COUNT"
|
require_integer "KEEP_COUNT" "$KEEP_COUNT"
|
||||||
|
|
||||||
if is_empty_or_null "${RUNNER_TOKEN:-}"; then
|
if is_empty_or_null "${GITEA_TOKEN:-}"; then
|
||||||
warn "RUNNER_TOKEN is empty; release API calls will be anonymous"
|
warn "GITEA_TOKEN is empty; release API calls will be anonymous"
|
||||||
else
|
else
|
||||||
info "RUNNER_TOKEN=[redacted]"
|
info "GITEA_TOKEN=[redacted]"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
release_api_url="$GITEA_SERVER_URL/api/v1/repos/$GITEA_REPOSITORY/releases"
|
release_api_url="$GITEA_SERVER_URL/api/v1/repos/$GITEA_REPOSITORY/releases"
|
||||||
auth_header=()
|
auth_header=()
|
||||||
|
|
||||||
if ! is_empty_or_null "${RUNNER_TOKEN:-}"; then
|
if ! is_empty_or_null "${GITEA_TOKEN:-}"; then
|
||||||
auth_header=(-H "Authorization: token $RUNNER_TOKEN")
|
auth_header=(-H "Authorization: token $GITEA_TOKEN")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
section "取得成品資訊"
|
section "取得成品資訊"
|
||||||
|
|||||||
Reference in New Issue
Block a user