refactor(config): rename GITEA_BASE_URL to BASE_URL across CI, scripts, docs
This commit is contained in:
parent
c96b09a308
commit
7d481a7c5e
@ -404,7 +404,7 @@ jobs:
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
env:
|
||||
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||
GITEA_BASE_URL: ${{ vars.GITEA_BASE_URL }}
|
||||
BASE_URL: ${{ vars.BASE_URL }}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
@ -413,18 +413,18 @@ jobs:
|
||||
set -e
|
||||
if [ -z "${RELEASE_TOKEN}" ]; then
|
||||
echo "RELEASE_TOKEN secret is missing" >&2; exit 1; fi
|
||||
if [ -z "${GITEA_BASE_URL}" ]; then
|
||||
GITEA_BASE_URL="https://git.4nkweb.com"; fi
|
||||
if [ -z "${BASE_URL}" ]; then
|
||||
BASE_URL="https://git.4nkweb.com"; fi
|
||||
TAG="${GITHUB_REF##*/}"
|
||||
REPO="${GITHUB_REPOSITORY}"
|
||||
OWNER="${REPO%%/*}"
|
||||
NAME="${REPO##*/}"
|
||||
echo "Publishing release ${TAG} to ${GITEA_BASE_URL}/${OWNER}/${NAME}"
|
||||
echo "Publishing release ${TAG} to ${BASE_URL}/${OWNER}/${NAME}"
|
||||
curl -sSf -X POST \
|
||||
-H "Authorization: token ${RELEASE_TOKEN}" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "{\"tag_name\":\"${TAG}\",\"name\":\"${TAG}\",\"draft\":false,\"prerelease\":false}" \
|
||||
"${GITEA_BASE_URL}/api/v1/repos/${OWNER}/${NAME}/releases" >/dev/null
|
||||
"${BASE_URL}/api/v1/repos/${OWNER}/${NAME}/releases" >/dev/null
|
||||
echo "Release created"
|
||||
|
||||
# Job de tests de performance
|
||||
|
@ -5,7 +5,7 @@
|
||||
- Secrets CI uniquement (pas de secrets en clair)
|
||||
- Variables agents : OPENAI_API_KEY, OPENAI_MODEL, OPENAI_API_BASE, OPENAI_TEMPERATURE
|
||||
- Secret release: RELEASE_TOKEN (publication des releases via l’API Gitea)
|
||||
- Variable optionnelle: GITEA_BASE_URL (ex: `https://git.4nkweb.com`)
|
||||
- Variable optionnelle: BASE_URL (ex: `https://git.4nkweb.com`)
|
||||
|
||||
## Conventions
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
- Script d’installation: `scripts/deploy/setup.sh`
|
||||
- Crée `~/.4nk_template/` (chmod 700) et `~/.4nk_template/.env` (chmod 600)
|
||||
- Copie depuis `scripts/env/.env.template` si présent, sinon génère un modèle
|
||||
- À compléter: `OPENAI_API_KEY`, `OPENAI_MODEL`, `RELEASE_TOKEN`, `GITEA_BASE_URL` (si custom)
|
||||
- À compléter: `OPENAI_API_KEY`, `OPENAI_MODEL`, `RELEASE_TOKEN`, `BASE_URL` (si custom)
|
||||
- Applique la structure 4NK_template au projet cible (sans écraser par défaut):
|
||||
- `.gitea/**`, `.cursor/**`, `.cursorignore`, `.gitignore`, `.markdownlint.json`
|
||||
- `AGENTS.md`, `LICENSE`, `CONTRIBUTING.md`, `CODE_OF_CONDUCT.md`, `SECURITY.md`, `TEMPLATE_VERSION`
|
||||
|
@ -14,7 +14,7 @@
|
||||
## 3. Secrets et variables
|
||||
|
||||
- Secrets: `OPENAI_API_KEY` (optionnel), `RELEASE_TOKEN` (obligatoire pour publier les releases via API Gitea)
|
||||
- Variables: paramètres de CI non sensibles, ex: `OPENAI_MODEL`, `OPENAI_API_BASE`, `OPENAI_TEMPERATURE`, `GITEA_BASE_URL`
|
||||
- Variables: paramètres de CI non sensibles, ex: `OPENAI_MODEL`, `OPENAI_API_BASE`, `OPENAI_TEMPERATURE`, `BASE_URL`
|
||||
|
||||
### Ajouter `RELEASE_TOKEN`
|
||||
|
||||
|
@ -67,7 +67,7 @@ OPENAI_API_BASE=https://api.openai.com/v1
|
||||
OPENAI_TEMPERATURE=0.2
|
||||
|
||||
# Gitea (release via API)
|
||||
GITEA_BASE_URL=https://git.4nkweb.com
|
||||
BASE_URL=https://git.4nkweb.com
|
||||
RELEASE_TOKEN=
|
||||
EOF
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user