From 5466630dbd5a68d22b1f367f31e1ed42b82083d5 Mon Sep 17 00:00:00 2001 From: Michael Freno Date: Mon, 10 Aug 2026 21:53:07 -0400 Subject: [PATCH] workflow: fail loudly on missing PORTING_TOKEN before trimming (set -u safe) --- .gitea/workflows/port-to-omp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/port-to-omp.yml b/.gitea/workflows/port-to-omp.yml index 43d1e96..a453a7e 100644 --- a/.gitea/workflows/port-to-omp.yml +++ b/.gitea/workflows/port-to-omp.yml @@ -33,8 +33,8 @@ jobs: 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:?PORTING_TOKEN secret is not set}" || exit 1 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