From 2e2a0b56f097f33aad935ef5f514facd5466edf3 Mon Sep 17 00:00:00 2001 From: natxocc Date: Wed, 15 Apr 2026 16:37:04 +0200 Subject: [PATCH] =?UTF-8?q?A=C3=B1adir=20.github/workflows/publicar-paquet?= =?UTF-8?q?e.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/publicar-paquete.yml | 36 ++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/publicar-paquete.yml diff --git a/.github/workflows/publicar-paquete.yml b/.github/workflows/publicar-paquete.yml new file mode 100644 index 0000000..f44f18c --- /dev/null +++ b/.github/workflows/publicar-paquete.yml @@ -0,0 +1,36 @@ +name: Generar Paquete Docker + +on: + # Permite ejecutarlo manualmente desde la pestaña "Acciones" + workflow_dispatch: + # Opcional: que se ejecute solo al crear una "Release" o etiqueta (tag) + push: + tags: + - 'v*' + +jobs: + build-and-push: + runs-on: ubuntu-latest # Esto coincidirá con el label de tu runner + steps: + - name: Checkout del código + uses: actions/checkout@v4 + + - name: Configurar Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login en Gitea Docker Registry + uses: docker/login-action@v3 + with: + registry: git.natxocc.com + username: ${{ gitea.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} # Gitea genera este token automáticamente + + - name: Construir y Subir imagen + uses: docker/build-push-action@v5 + with: + context: . + push: true + # El nombre será: git.natxocc.com/usuario/repositorio:latest + tags: | + git.natxocc.com/${{ gitea.repository }}:latest + git.natxocc.com/${{ gitea.repository }}:${{ gitea.ref_name }} \ No newline at end of file