From c4e8996a228c4930baf05cba4ddc780132829ea5 Mon Sep 17 00:00:00 2001 From: joelson Date: Mon, 5 Jan 2026 12:00:48 -0300 Subject: [PATCH] feat: add deployment workflow for vendaweb-api --- .gitea/deploy-api.yaml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .gitea/deploy-api.yaml diff --git a/.gitea/deploy-api.yaml b/.gitea/deploy-api.yaml new file mode 100644 index 0000000..eea3ff1 --- /dev/null +++ b/.gitea/deploy-api.yaml @@ -0,0 +1,27 @@ +name: Deploy vendaweb-api +on: [push] + +jobs: + build-and-push-deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Login no Harbor + run: | + echo "${{ secrets.HARBOR_PASSWORD }}" | docker login harbor.jurunense.com -u ${{ secrets.HARBOR_USERNAME }} --password-stdin + + - name: Build e Push + run: | + TAG=${{ gitea.sha }} + docker build -t harbor.jurunense.com/library/vendaweb-api:$TAG . + docker tag harbor.jurunense.com/library/vendaweb-api:$TAG harbor.jurunense.com/library/vendaweb-api:latest + + docker push harbor.jurunense.com/library/vendaweb-api:$TAG + docker push harbor.jurunense.com/library/vendaweb-api:latest + + - name: Notificar Portainer via Webhook + run: | + # O Webhook avisa o Portainer para puxar a nova imagem imediatamente + curl -X POST "${{ secrets.PORTAINER_WEBHOOK_VENDAWEBAPI }}" \ No newline at end of file