fix: preserve FORGE_TOKEN override when sourcing .env
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
Same pattern as FORGE_URL — the llama container sets FORGE_TOKEN to dev-qwen token via FORGE_TOKEN_OVERRIDE, but env.sh sources .env which clobbers it back to dev-bot. All PRs and issue claims show dev-bot instead of dev-qwen, and assignee locking fails. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
f316087003
commit
5bcaaf7d88
1 changed files with 4 additions and 0 deletions
|
|
@ -28,18 +28,22 @@ export DISINTO_LOG_DIR
|
||||||
if [ -f "$FACTORY_ROOT/.env.enc" ] && command -v sops &>/dev/null; then
|
if [ -f "$FACTORY_ROOT/.env.enc" ] && command -v sops &>/dev/null; then
|
||||||
set -a
|
set -a
|
||||||
_saved_forge_url="${FORGE_URL:-}"
|
_saved_forge_url="${FORGE_URL:-}"
|
||||||
|
_saved_forge_token="${FORGE_TOKEN:-}"
|
||||||
eval "$(sops -d --output-type dotenv "$FACTORY_ROOT/.env.enc" 2>/dev/null)" \
|
eval "$(sops -d --output-type dotenv "$FACTORY_ROOT/.env.enc" 2>/dev/null)" \
|
||||||
|| echo "Warning: failed to decrypt .env.enc — secrets not loaded" >&2
|
|| echo "Warning: failed to decrypt .env.enc — secrets not loaded" >&2
|
||||||
set +a
|
set +a
|
||||||
[ -n "$_saved_forge_url" ] && export FORGE_URL="$_saved_forge_url"
|
[ -n "$_saved_forge_url" ] && export FORGE_URL="$_saved_forge_url"
|
||||||
|
[ -n "$_saved_forge_token" ] && export FORGE_TOKEN="$_saved_forge_token"
|
||||||
elif [ -f "$FACTORY_ROOT/.env" ]; then
|
elif [ -f "$FACTORY_ROOT/.env" ]; then
|
||||||
# Preserve compose-injected FORGE_URL (localhost in .env != forgejo in Docker)
|
# Preserve compose-injected FORGE_URL (localhost in .env != forgejo in Docker)
|
||||||
_saved_forge_url="${FORGE_URL:-}"
|
_saved_forge_url="${FORGE_URL:-}"
|
||||||
|
_saved_forge_token="${FORGE_TOKEN:-}"
|
||||||
set -a
|
set -a
|
||||||
# shellcheck source=/dev/null
|
# shellcheck source=/dev/null
|
||||||
source "$FACTORY_ROOT/.env"
|
source "$FACTORY_ROOT/.env"
|
||||||
set +a
|
set +a
|
||||||
[ -n "$_saved_forge_url" ] && export FORGE_URL="$_saved_forge_url"
|
[ -n "$_saved_forge_url" ] && export FORGE_URL="$_saved_forge_url"
|
||||||
|
[ -n "$_saved_forge_token" ] && export FORGE_TOKEN="$_saved_forge_token"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# PATH: foundry, node, system
|
# PATH: foundry, node, system
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue