From 7d481a7c5e4051f67419f9633e14b6479e05fc76 Mon Sep 17 00:00:00 2001 From: Nicolas Cantu Date: Thu, 28 Aug 2025 00:09:19 +0200 Subject: [PATCH] refactor(config): rename GITEA_BASE_URL to BASE_URL across CI, scripts, docs --- .gitea/workflows/ci.yml | 10 +++++----- docs/project/CONFIGURATION.md | 2 +- docs/project/DEPLOYMENT.md | 2 +- docs/project/GITEA_SETUP.md | 2 +- scripts/deploy/setup.sh | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 4186cb0..224714e 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -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 diff --git a/docs/project/CONFIGURATION.md b/docs/project/CONFIGURATION.md index 1bae7e3..f876a2e 100644 --- a/docs/project/CONFIGURATION.md +++ b/docs/project/CONFIGURATION.md @@ -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 diff --git a/docs/project/DEPLOYMENT.md b/docs/project/DEPLOYMENT.md index a419501..81438df 100644 --- a/docs/project/DEPLOYMENT.md +++ b/docs/project/DEPLOYMENT.md @@ -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` diff --git a/docs/project/GITEA_SETUP.md b/docs/project/GITEA_SETUP.md index 9cdc3d8..347a7d6 100644 --- a/docs/project/GITEA_SETUP.md +++ b/docs/project/GITEA_SETUP.md @@ -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` diff --git a/scripts/deploy/setup.sh b/scripts/deploy/setup.sh index 2749d49..8908ea9 100644 --- a/scripts/deploy/setup.sh +++ b/scripts/deploy/setup.sh @@ -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