Some checks failed
Build and Deploy / build-and-deploy (push) Failing after 6m46s
Reemplazo completo de Evolution API por implementación directa con Baileys. Características: - Dashboard completo con Nuxt UI v4 - Soporte para múltiples instancias de WhatsApp - Conexión via QR code o pairing code - Persistencia de mensajes en PostgreSQL - API REST para integraciones externas - Webhooks con firma HMAC - SSE para actualizaciones en tiempo real - Autenticación con Authentik
62 lines
2.0 KiB
YAML
62 lines
2.0 KiB
YAML
name: Build and Deploy
|
|
|
|
on:
|
|
push:
|
|
branches: [ main, master ]
|
|
|
|
jobs:
|
|
build-and-deploy:
|
|
runs-on: docker
|
|
env:
|
|
APP_NAME: ${{ vars.APP_NAME }}
|
|
APP_DOMAIN: ${{ vars.APP_DOMAIN }}
|
|
REG: ${{ vars.REGISTRY_URL }}
|
|
REPO_OWNER: ${{ vars.REPO_OWNER }}
|
|
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}
|
|
MASTER_API_KEY: ${{ secrets.MASTER_API_KEY }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Info about environment
|
|
run: |
|
|
echo "Building ${{ vars.APP_NAME }}"
|
|
echo "Domain: ${{ vars.APP_DOMAIN }}"
|
|
echo "Registry: ${{ vars.REGISTRY_URL }}"
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Login to Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ vars.REGISTRY_URL }}
|
|
username: ${{ secrets.REGISTRY_USER }}
|
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
|
|
|
- name: Build and push image
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
push: true
|
|
tags: |
|
|
${{ vars.REGISTRY_URL }}/${{ vars.REPO_OWNER }}/${{ vars.APP_NAME }}:latest
|
|
${{ vars.REGISTRY_URL }}/${{ vars.REPO_OWNER }}/${{ vars.APP_NAME }}:${{ github.sha }}
|
|
cache-from: type=registry,ref=${{ vars.REGISTRY_URL }}/${{ vars.REPO_OWNER }}/${{ vars.APP_NAME }}:buildcache
|
|
cache-to: type=registry,ref=${{ vars.REGISTRY_URL }}/${{ vars.REPO_OWNER }}/${{ vars.APP_NAME }}:buildcache,mode=max
|
|
|
|
- name: Pull fresh images
|
|
run: docker compose pull
|
|
|
|
- name: Stop existing stack
|
|
run: docker compose --project-name $APP_NAME down --remove-orphans || true
|
|
|
|
- name: Start new stack
|
|
run: docker compose --project-name $APP_NAME up -d --wait
|
|
|
|
- name: Health check
|
|
run: |
|
|
echo "Waiting for application to be ready..."
|
|
sleep 15
|
|
curl -sf https://${{ vars.APP_DOMAIN }}/api/health || echo "Health check warning - may need more time to start"
|