fix(ci): FTP-secrets vor URL-bau trimmen

curl hat den ersten upload mit "URL using bad/illegal format"
abgebrochen. Wahrscheinliche ursache: trailing newline in einem
der FTP-secrets (passiert beim copy-paste in die GitHub-secrets-UI,
wenn der quell-string ein \n am ende hatte).

tr -d '\r\n' entfernt CR/LF aus allen vier FTP-vars, bevor sie in
die URL gehen.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jörg Lohrer 2026-04-28 11:03:14 +02:00
parent 64cd2b8add
commit f39b4ad62f
1 changed files with 7 additions and 0 deletions

View File

@ -108,6 +108,13 @@ jobs:
FTP_PASS: ${{ secrets[steps.target.outputs.ftp_pass_secret] }}
FTP_PATH: ${{ secrets[steps.target.outputs.ftp_path_secret] }}
run: |
# Trim secrets: GitHub-secrets behalten manchmal trailing-newlines,
# die beim copy-paste reingerutscht sind. tr -d '\r\n' entfernt
# alle CR/LF, gegen "URL using bad/illegal format" beim curl.
FTP_HOST=$(printf '%s' "$FTP_HOST" | tr -d '\r\n')
FTP_USER=$(printf '%s' "$FTP_USER" | tr -d '\r\n')
FTP_PASS=$(printf '%s' "$FTP_PASS" | tr -d '\r\n')
FTP_PATH=$(printf '%s' "$FTP_PATH" | tr -d '\r\n')
if [ -z "$FTP_HOST" ] || [ -z "$FTP_USER" ] || [ -z "$FTP_PASS" ] || [ -z "$FTP_PATH" ]; then
echo "FEHLER: FTP-Secrets fuer target '${{ inputs.target }}' nicht gesetzt." >&2
exit 1