diff --git a/action.yaml b/action.yaml index 560e05c..ff09055 100644 --- a/action.yaml +++ b/action.yaml @@ -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 }} diff --git a/entrypoint.sh b/entrypoint.sh index cfa7dc0..dfefcad 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -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 "取得成品資訊"