From 5e7cee15e3350bf0956d9b223a88716e7b5d9f79 Mon Sep 17 00:00:00 2001 From: Michael Freno Date: Mon, 10 Aug 2026 16:44:52 -0400 Subject: [PATCH] workflow: trim PORTING_TOKEN (paste newlines break oauth2 auth) + fail loudly when missing --- .gitea/workflows/port-to-omp.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitea/workflows/port-to-omp.yml b/.gitea/workflows/port-to-omp.yml index 79901e2..43d1e96 100644 --- a/.gitea/workflows/port-to-omp.yml +++ b/.gitea/workflows/port-to-omp.yml @@ -31,6 +31,10 @@ jobs: OMP_REPO: omp-ralpi run: | set -euo pipefail + # Trim the secret: a stray newline from pasting silently breaks + # oauth2 basic-auth. Fail loudly when it is missing entirely. + PORTING_TOKEN="$(printf '%s' "${PORTING_TOKEN}" | tr -d '[:space:]')" + : "${PORTING_TOKEN:?PORTING_TOKEN secret is not set}" URL="https://oauth2:${PORTING_TOKEN}@git.freno.me/Mike/${OMP_REPO}.git" # The omp checkout lives in $RUNNER_TEMP, outside the pi checkout: # the port script refuses to write into a subdirectory of its own