Atualizar .gitea/workflows/build.yaml
Some checks failed
Build e Deploy Direto / build-and-deploy (push) Failing after 4s
Some checks failed
Build e Deploy Direto / build-and-deploy (push) Failing after 4s
This commit is contained in:
@@ -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 }}"
|
||||
Reference in New Issue
Block a user