Files
nucleoDocs/.gitea/workflows/build-and-deploy.yml
josedario87 9daf26d541
Some checks failed
build-and-deploy / build-and-deploy (push) Failing after 15s
Forzar rebuild sin caché para MCP Metabase
- Agregar --no-cache al build de mcp-metabase-server
- Soluciona problema de caché de Docker usando código viejo
2025-10-28 15:44:16 -06:00

79 lines
3.2 KiB
YAML
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

name: build-and-deploy
on:
push:
branches: [ main, master ]
jobs:
#───────────────── build, push & deploy (unified) ─────────────────
build-and-deploy:
runs-on: docker
env:
REG: ${{ vars.REGISTRY_URL }}
APP_NAME: ${{ vars.APP_NAME }}
REPO_OWNER: ${{ github.repository_owner }}
# Variables de entorno para docker-compose
APP_DOMAIN: ${{ vars.APP_DOMAIN }}
NUXT_PUBLIC_APP_URL: ${{ vars.NUXT_PUBLIC_APP_URL }}
DOCKER_DOMAIN: ${{ vars.DOCKER_DOMAIN }}
# Variables para MCP Gitea Server
GIT_URL: ${{ vars.GIT_URL }}
GIT_DOMAIN: ${{ vars.GIT_DOMAIN }}
GIT_TOKEN: ${{ secrets.GIT_TOKEN }}
# Variables para MCP Metabase Server
METABASE_DOMAIN: ${{ vars.METABASE_DOMAIN }}
METABASE_INTERNAL_URL: ${{ vars.METABASE_INTERNAL_URL }}
METABASE_API_KEY: ${{ secrets.METABASE_API_KEY }}
steps:
- uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v2
- uses: docker/login-action@v2
with:
registry: ${{ vars.REGISTRY_URL }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build+push ${{ vars.APP_NAME }}
run: |
cd nuxt4
docker build -t $REG/$REPO_OWNER/$APP_NAME:${{ github.sha }} -t $REG/$REPO_OWNER/$APP_NAME:latest .
docker push $REG/$REPO_OWNER/$APP_NAME:${{ github.sha }}
docker push $REG/$REPO_OWNER/$APP_NAME:latest
- name: Build+push MCP Docker Server
run: |
cd mcp-docker-server
docker build -t $REG/$REPO_OWNER/mcp-docker-server:${{ github.sha }} -t $REG/$REPO_OWNER/mcp-docker-server:latest .
docker push $REG/$REPO_OWNER/mcp-docker-server:${{ github.sha }}
docker push $REG/$REPO_OWNER/mcp-docker-server:latest
- name: Build+push MCP Gitea Server
run: |
cd mcp-gitea-server
docker build -t $REG/$REPO_OWNER/mcp-gitea-server:${{ github.sha }} -t $REG/$REPO_OWNER/mcp-gitea-server:latest .
docker push $REG/$REPO_OWNER/mcp-gitea-server:${{ github.sha }}
docker push $REG/$REPO_OWNER/mcp-gitea-server:latest
- name: Build+push MCP Metabase Server
run: |
cd mcp-metabase-server
docker build --no-cache -t $REG/$REPO_OWNER/mcp-metabase-server:${{ github.sha }} -t $REG/$REPO_OWNER/mcp-metabase-server:latest .
docker push $REG/$REPO_OWNER/mcp-metabase-server:${{ github.sha }}
docker push $REG/$REPO_OWNER/mcp-metabase-server:latest
- name: Info about environment
run: |
echo " Deploying ${{ vars.APP_NAME }}"
echo " Domain: ${{ vars.APP_DOMAIN }}"
echo " Image: ${{ vars.REGISTRY_URL }}/${{ github.repository_owner }}/${{ vars.APP_NAME }}:latest"
echo " Network: principal"
- name: Pull fresh images used in compose
run: docker compose pull
- name: Clean up stack
run: docker compose --project-name $APP_NAME down
- name: Update stack
run: docker compose --project-name $APP_NAME up -d --remove-orphans --wait