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:
@@ -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:-}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user