From 583f0e5193aa2350ed2f23d4ea9d8a13e3a82af5 Mon Sep 17 00:00:00 2001 From: carloshra Date: Thu, 26 Feb 2026 23:41:50 +0000 Subject: [PATCH] Atualizar .gitea/workflows/build.yaml --- .gitea/workflows/build.yaml | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index c5b85f3..f34ef9e 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -1,28 +1,30 @@ -name: CI/CD Pipeline Coolify -run-name: Pipeline executada por ${{ gitea.actor }} 🚀 +name: Build e Deploy Direto +run-name: Build & Deploy por ${{ gitea.actor }} 🚀 on: push: branches: [ "main", "master" ] jobs: - testes: + build-and-deploy: runs-on: ubuntu-latest - container: - image: maven:3.9.6-eclipse-temurin-21 # Imagem oficial com tudo pronto steps: - name: Checkout do código uses: actions/checkout@v4 - - name: Rodar Testes com Maven - run: mvn -B test # Aqui o 'mvn' já vai funcionar direto + - name: Configurar JDK 21 + uses: actions/setup-java@v4 + with: + java-version: '21' + distribution: 'temurin' - # Job 2: Trigger da API (Só roda se os testes passarem) - deploy-trigger: - needs: testes - runs-on: ubuntu-latest - steps: - - name: Disparar Deploy no Coolify + - name: Build do JAR (Sem Testes) + run: | + # O -DskipTests ignora os testes e foca só em gerar o arquivo + chmod +x mvnw + ./mvnw clean package -DskipTests + + - name: Chamar Webhook do Coolify run: | curl -X GET "https://coolify.stackpanel.com.br/api/v1/deploy?uuid=iwwcg08c04css0o444k08sgg&force=false" \ -H "Authorization: Bearer ${{ secrets.COOLIFY_TOKEN }}" \ No newline at end of file