workflow: fail loudly on missing PORTING_TOKEN before trimming (set -u safe)

This commit is contained in:
2026-08-10 21:53:07 -04:00
parent 5e7cee15e3
commit 5466630dbd

View File

@@ -33,8 +33,8 @@ jobs:
set -euo pipefail set -euo pipefail
# Trim the secret: a stray newline from pasting silently breaks # Trim the secret: a stray newline from pasting silently breaks
# oauth2 basic-auth. Fail loudly when it is missing entirely. # 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="$(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" URL="https://oauth2:${PORTING_TOKEN}@git.freno.me/Mike/${OMP_REPO}.git"
# The omp checkout lives in $RUNNER_TEMP, outside the pi checkout: # The omp checkout lives in $RUNNER_TEMP, outside the pi checkout:
# the port script refuses to write into a subdirectory of its own # the port script refuses to write into a subdirectory of its own