Trim whitespace from the forge token before use
ci/woodpecker/manual/woodpecker Pipeline was successful

A trailing newline pasted into the Woodpecker secret broke the push URL
("credential url cannot be parsed"); strip all whitespace from the token in
both the mirror and the gem-publish steps.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-04 20:07:13 +02:00
co-authored by Claude Fable 5
parent b1b619befa
commit 211dcccbf3
+5 -2
View File
@@ -30,7 +30,9 @@ steps:
commands:
- apk add --no-cache git-subtree
- git subtree split --prefix=libs/ruby/warp_engine HEAD -b warp-engine-split
- git push --force "https://ci:$${FORGE_TOKEN}@git.teletypegames.org/tools/warp_engine.git" warp-engine-split:master
# a secretbe másolt token végén lehet sortörés — levágjuk
- TOKEN="$$(printf '%s' "$${FORGE_TOKEN}" | tr -d '[:space:]')"
- git push --force "https://ci:$${TOKEN}@git.teletypegames.org/tools/warp_engine.git" warp-engine-split:master
when:
- event: push
branch: master
@@ -45,8 +47,9 @@ steps:
- cd libs/ruby/warp_engine
- gem build warp_engine.gemspec
- mkdir -p ~/.gem
- TOKEN="$$(printf '%s' "$${FORGE_TOKEN}" | tr -d '[:space:]')"
- |
printf -- '---\n:https://git.teletypegames.org/api/packages/tools/rubygems: Bearer %s\n' "$${FORGE_TOKEN}" > ~/.gem/credentials
printf -- '---\n:https://git.teletypegames.org/api/packages/tools/rubygems: Bearer %s\n' "$${TOKEN}" > ~/.gem/credentials
- chmod 600 ~/.gem/credentials
- gem push --host https://git.teletypegames.org/api/packages/tools/rubygems warp_engine-*.gem
when: