修正 Release Cleanup action 與 Gitea workflow 設定 #3

Merged
admin merged 4 commits from develop into master 2026-06-25 10:59:55 +00:00
2 changed files with 6 additions and 6 deletions
Showing only changes of commit 0e91eb6cf3 - Show all commits
+1 -1
View File
@@ -12,5 +12,5 @@ runs:
env:
GITEA_SERVER_URL: ${{ gitea.server_url }}
GITEA_REPOSITORY: ${{ gitea.repository }}
RUNNER_TOKEN: ${{ gitea.token }}
GITEA_TOKEN: ${{ gitea.token }}
KEEP_COUNT: ${{ inputs.keep_count }}
+5 -5
View File
@@ -79,17 +79,17 @@ require_value "GITEA_REPOSITORY" "$GITEA_REPOSITORY"
require_value "KEEP_COUNT" "$KEEP_COUNT"
require_integer "KEEP_COUNT" "$KEEP_COUNT"
if is_empty_or_null "${RUNNER_TOKEN:-}"; then
warn "RUNNER_TOKEN is empty; release API calls will be anonymous"
if is_empty_or_null "${GITEA_TOKEN:-}"; then
warn "GITEA_TOKEN is empty; release API calls will be anonymous"
else
info "RUNNER_TOKEN=[redacted]"
info "GITEA_TOKEN=[redacted]"
fi
release_api_url="$GITEA_SERVER_URL/api/v1/repos/$GITEA_REPOSITORY/releases"
auth_header=()
if ! is_empty_or_null "${RUNNER_TOKEN:-}"; then
auth_header=(-H "Authorization: token $RUNNER_TOKEN")
if ! is_empty_or_null "${GITEA_TOKEN:-}"; then
auth_header=(-H "Authorization: token $GITEA_TOKEN")
fi
section "取得成品資訊"