feat: atualizando mensagem de webhook
All checks were successful
Deploy NestJS API / build-and-push-deploy (push) Successful in 49s
All checks were successful
Deploy NestJS API / build-and-push-deploy (push) Successful in 49s
This commit is contained in:
@@ -14,6 +14,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Build e Push
|
- name: Build e Push
|
||||||
run: |
|
run: |
|
||||||
|
# Tag imutável para Rollback (SHA do Git)
|
||||||
TAG=${{ gitea.sha }}
|
TAG=${{ gitea.sha }}
|
||||||
docker build -t 172.35.0.216/library/api-teste:$TAG .
|
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 tag 172.35.0.216/library/api-teste:$TAG 172.35.0.216/library/api-teste:latest
|
||||||
@@ -21,12 +22,19 @@ jobs:
|
|||||||
docker push 172.35.0.216/library/api-teste:$TAG
|
docker push 172.35.0.216/library/api-teste:$TAG
|
||||||
docker push 172.35.0.216/library/api-teste:latest
|
docker push 172.35.0.216/library/api-teste:latest
|
||||||
|
|
||||||
- name: Deploy
|
- name: Deploy Automático via SSH
|
||||||
run: |
|
uses: https://github.com/appleboy/ssh-action@master
|
||||||
sleep 10
|
with:
|
||||||
curl -X POST http://172.35.0.216:9000/api/webhooks/182007f4-06d9-48fc-ab68-885fb434765c
|
host: 172.35.0.216
|
||||||
|
username: root
|
||||||
# LEGADO Deploy via SSH (Mantenha se precisar rodar comandos extras como migrations)
|
key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||||
# - name: Deploy Automático via SSH
|
script: |
|
||||||
# uses: https://github.com/appleboy/ssh-action@master
|
docker service update \
|
||||||
# ...
|
--image 172.35.0.216/library/api-teste:latest \
|
||||||
|
--with-registry-auth \
|
||||||
|
api_teste_service || \
|
||||||
|
docker service create \
|
||||||
|
--name api_teste_service \
|
||||||
|
--publish 3001:3000 \
|
||||||
|
--with-registry-auth \
|
||||||
|
172.35.0.216/library/api-teste:latest
|
||||||
@@ -3,6 +3,6 @@ import { Injectable } from '@nestjs/common';
|
|||||||
@Injectable()
|
@Injectable()
|
||||||
export class AppService {
|
export class AppService {
|
||||||
getHello(): string {
|
getHello(): string {
|
||||||
return 'Hello World! webhook';
|
return 'Hello World! ssh';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user