All checks were successful
Deploy NestJS API / build-and-push-deploy (push) Successful in 24s
31 lines
1.0 KiB
YAML
31 lines
1.0 KiB
YAML
name: Deploy NestJS 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 172.35.0.216 -u ${{ secrets.HARBOR_USERNAME }} --password-stdin
|
|
|
|
- name: Build e Push
|
|
run: |
|
|
TAG=${{ gitea.sha }}
|
|
docker build -t 172.35.0.216/library/api-teste:$TAG .
|
|
docker tag 172.35.0.216/library/api-teste:$TAG 172.35.0.216/library/api-teste:latest
|
|
|
|
docker push 172.35.0.216/library/api-teste:$TAG
|
|
docker push 172.35.0.216/library/api-teste:latest
|
|
|
|
- name: Deploy
|
|
run: |
|
|
curl -X POST http://172.35.0.216:9000/api/webhooks/182007f4-06d9-48fc-ab68-885fb434765c
|
|
|
|
# LEGADO Deploy via SSH (Mantenha se precisar rodar comandos extras como migrations)
|
|
# - name: Deploy Automático via SSH
|
|
# uses: https://github.com/appleboy/ssh-action@master
|
|
# ... (seu código atual) |