From cf430fdc75340f92f4fab09036112f4665684cbb Mon Sep 17 00:00:00 2001 From: Nilton-Gabriel Date: Wed, 29 May 2024 00:53:33 -0300 Subject: [PATCH] CD EC2 --- .github/workflows/cd.yml | 5 ++++- .github/workflows/ci.yml | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index c03ee0e..6d4b8e1 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -12,8 +12,11 @@ jobs: - name: Pull Docker image run: docker pull niltongabriel/ecosystem-api:latest - - name: Romeve old DOcker Container + - name: Stop old Docker Container run: docker stop ecosystem-api || true + + - name: Remove old Docker Container + run: docker rm ecosystem-api || true - name: Run Docker container run: docker run --name ecosystem-api -d -p 8080:8080 niltongabriel/ecosystem-api:latest diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cc6c8ab..1f37e80 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,6 @@ name: Ecosystem API CI -on: +on: #Executa o CI quando um pull request é aberto ou reaberto pull_request: branches: - main