chore(P01): source .env in trigger_coreci.sh for GITEA_TOKEN

---ci---
project: orca
phase: 1
milestone: v0.1
status: ship
---/ci---
This commit is contained in:
Jon Chery
2026-06-03 12:34:55 +00:00
parent e3f6e1df82
commit 46e929e4c6
+14
View File
@@ -5,6 +5,20 @@
set -uo pipefail
# Source .env if present (provides GITEA_TOKEN)
# Look in repo root, then cwd, then script dir
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
for env_file in "$REPO_ROOT/.env" "$PWD/.env" "./.env"; do
if [ -f "$env_file" ]; then
set -a
# shellcheck disable=SC1090
. "$env_file"
set +a
break
fi
done
CORECI_URL="${CORECI_URL:-https://git.cloudinit.dev/coreci/coreci}"
GITEA_TOKEN="${GITEA_TOKEN:-}"