From 9569c94b6c147cab2cef73fb04a747ff5c3d1372 Mon Sep 17 00:00:00 2001 From: devops Date: Fri, 24 Jul 2026 05:58:04 +0000 Subject: [PATCH] Update .gitea/workflows/build.yaml --- .gitea/workflows/build.yaml | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 494f1f0..937cbd0 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -29,12 +29,32 @@ jobs: # Formato v1.0.X (X = número de ejecución del pipeline) echo "VERSION=v1.0.${{ github.run_number }}" >> $GITHUB_OUTPUT + - name: Validar secretos del Registry + shell: bash + env: + REGISTRY_USER: ${{ secrets.REGISTRY_USER }} + REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }} + run: | + set -euo pipefail + + test -n "${REGISTRY_USER}" || { + echo "ERROR: REGISTRY_USER no está configurado." + exit 1 + } + + test -n "${REGISTRY_PASSWORD}" || { + echo "ERROR: REGISTRY_PASSWORD no está configurado." + exit 1 + } + + echo "OK: secretos del Registry disponibles." + - name: Login en Gitea Registry uses: docker/login-action@v2 with: registry: gitea.cruzcloud.net - username: ${{ gitea.actor }} - password: ${{ secrets.GITEA_TOKEN }} + username: ${{ secrets.REGISTRY_USER }} + password: ${{ secrets.REGISTRY_PASSWORD }} logout: true # 2. ACTUALIZADO: Usamos la nueva variable para los tags de Docker