From 3d81517c03a2895e6ea24d371b4adb17cdeb7487 Mon Sep 17 00:00:00 2001 From: josedario87 Date: Fri, 31 Oct 2025 22:02:51 -0600 Subject: [PATCH] =?UTF-8?q?Fix:=20Reorganizar=20workflow=20para=20forzar?= =?UTF-8?q?=20regeneraci=C3=B3n=20de=20config?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Detener contenedor ANTES de eliminar config.json - Eliminar certificados y bases de datos viejas - Generar config.json limpio con OIDC configurado - Evitar duplicación de steps en el workflow --- .gitea/workflows/build-and-deploy.yml | 28 ++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/.gitea/workflows/build-and-deploy.yml b/.gitea/workflows/build-and-deploy.yml index a364266..1b31d1e 100644 --- a/.gitea/workflows/build-and-deploy.yml +++ b/.gitea/workflows/build-and-deploy.yml @@ -32,10 +32,25 @@ jobs: mkdir -p meshcentral-backup mkdir -p meshcentral-config + - name: Pull latest MeshCentral image + run: docker pull ghcr.io/ylianst/meshcentral:latest + + - name: Pull fresh images used in compose + run: docker compose pull + + - name: Clean up existing stack + run: docker compose --project-name $APP_NAME down + + - name: Remove old config to force regeneration + run: | + rm -f meshcentral-data/config.json + rm -f meshcentral-data/*.db + rm -f meshcentral-data/*.crt + rm -f meshcentral-data/*.key + rm -f meshcentral-data/serverstate.txt + - name: Generate MeshCentral config.json run: | - # Forzar regeneración del config.json - rm -f meshcentral-data/config.json cat > meshcentral-data/config.json <<'EOF' { "settings": { @@ -92,15 +107,6 @@ jobs: chmod -R 755 meshcentral-backup chmod -R 755 meshcentral-config - - name: Pull latest MeshCentral image - run: docker pull ghcr.io/ylianst/meshcentral:latest - - - name: Pull fresh images used in compose - run: docker compose pull - - - name: Clean up existing stack - run: docker compose --project-name $APP_NAME down - - name: Start MeshCentral stack run: docker compose --project-name $APP_NAME up -d --remove-orphans --wait