chore(deploy): wire OWN_DEVELOPER_IDS into prod env for §25.3 own-portfolio (#1169)
All checks were successful
CI / changes (push) Successful in 6s
CI / backend-tests (push) Has been skipped
CI / frontend-tests (push) Has been skipped
Deploy / changes (push) Successful in 6s
Deploy / build-worker (push) Successful in 32s
Deploy / build-frontend (push) Successful in 30s
CI / changes (pull_request) Successful in 5s
CI / backend-tests (pull_request) Has been skipped
CI / frontend-tests (pull_request) Has been skipped
Deploy / build-backend (push) Successful in 35s
Deploy / deploy (push) Successful in 1m3s
All checks were successful
CI / changes (push) Successful in 6s
CI / backend-tests (push) Has been skipped
CI / frontend-tests (push) Has been skipped
Deploy / changes (push) Successful in 6s
Deploy / build-worker (push) Successful in 32s
Deploy / build-frontend (push) Successful in 30s
CI / changes (pull_request) Successful in 5s
CI / backend-tests (pull_request) Has been skipped
CI / frontend-tests (pull_request) Has been skipped
Deploy / build-backend (push) Successful in 35s
Deploy / deploy (push) Successful in 1m3s
Mirror the LLM_ENABLED wiring for OWN_DEVELOPER_IDS (own-portfolio cannibalization, #1169): forward vars.OWN_DEVELOPER_IDS into the SSH deploy (env block + envs list) and write it to backend/.env.runtime ONLY when non-empty (conditional, like OPENAI_API_KEY/LLM_ENABLED). Non-sensitive (public companyGroup ids) → actions variable. Unset → cannibalization keeps the proxy (dormant). No literal id in the workflow (refs only). Captures in the pipeline the value already set live on prod via .env.runtime (OWN_DEVELOPER_IDS=6208 = PRINZIP, verified against domrf_kn → 28 projects). Owner must set Forgejo Variable OWN_DEVELOPER_IDS=6208 for full pipeline management; meanwhile the .env.runtime line holds (survives git reset). Refs #1169
This commit is contained in:
parent
c9720a6212
commit
d7960276b1
1 changed files with 15 additions and 1 deletions
|
|
@ -170,12 +170,16 @@ jobs:
|
|||
# boolean toggle → actions variable (vars.*).
|
||||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
||||
LLM_ENABLED: ${{ vars.LLM_ENABLED }}
|
||||
# OWN_DEVELOPER_IDS (#1169 §25.3): свои developer_id (companyGroup) для
|
||||
# own-portfolio каннибализации. Non-sensitive (публичные id) → actions
|
||||
# variable. UNSET → каннибализация отдаёт proxy (фича дормант).
|
||||
OWN_DEVELOPER_IDS: ${{ vars.OWN_DEVELOPER_IDS }}
|
||||
with:
|
||||
host: ${{ secrets.DEPLOY_HOST }}
|
||||
username: ${{ secrets.DEPLOY_USER }}
|
||||
key: ${{ secrets.DEPLOY_SSH_KEY }}
|
||||
port: ${{ secrets.DEPLOY_PORT }}
|
||||
envs: IMAGE_TAG,SENTRY_RELEASE_VAL,GHCR_PAT,GLITCHTIP_BACKEND_DSN,OBJECTIVE_API_KEY,OPENAI_API_KEY,LLM_ENABLED
|
||||
envs: IMAGE_TAG,SENTRY_RELEASE_VAL,GHCR_PAT,GLITCHTIP_BACKEND_DSN,OBJECTIVE_API_KEY,OPENAI_API_KEY,LLM_ENABLED,OWN_DEVELOPER_IDS
|
||||
script: |
|
||||
set -euo pipefail
|
||||
cd /opt/gendesign
|
||||
|
|
@ -233,6 +237,16 @@ jobs:
|
|||
printf 'LLM_ENABLED=%s\n' "$LLM_ENABLED" >> backend/.env.runtime
|
||||
fi
|
||||
fi
|
||||
# OWN_DEVELOPER_IDS (#1169 §25.3 own-portfolio каннибализация). Тоже
|
||||
# conditional-on-non-empty: UNSET var → не трогаем (если строка уже есть
|
||||
# в .env.runtime — она переживает git reset, .gitignored — остаётся).
|
||||
if [ -n "${OWN_DEVELOPER_IDS:-}" ]; then
|
||||
if grep -q '^OWN_DEVELOPER_IDS=' backend/.env.runtime; then
|
||||
sed -i "s|^OWN_DEVELOPER_IDS=.*|OWN_DEVELOPER_IDS=$OWN_DEVELOPER_IDS|" backend/.env.runtime
|
||||
else
|
||||
printf 'OWN_DEVELOPER_IDS=%s\n' "$OWN_DEVELOPER_IDS" >> backend/.env.runtime
|
||||
fi
|
||||
fi
|
||||
chmod 600 backend/.env.runtime
|
||||
|
||||
# External network для Caddy + obsidian-stack share
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue