Skip to content

Commit

Permalink
fix aws connect
Browse files Browse the repository at this point in the history
  • Loading branch information
acaiado committed Apr 4, 2024
1 parent d30a064 commit 96ed21e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/CI-CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,11 @@ jobs:
chmod 600 key.pem
- name: Pull Docker image
run: |
ssh -o StrictHostKeyChecking=no -i key.pem spring-boot-test-cicd-[email protected] 'sudo docker pull ${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}:${{ needs.prepare.outputs.tag_version }}'
ssh -o StrictHostKeyChecking=no -i key.pem ec2-user@52.56.61.209 'sudo docker pull ${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}:${{ needs.prepare.outputs.tag_version }}'
- name: Stop running container
run: |
ssh -o StrictHostKeyChecking=no -i key.pem spring-boot-test-cicd-[email protected] 'sudo docker stop spring-boot-tests-cicd || true'
ssh -o StrictHostKeyChecking=no -i key.pem spring-boot-test-cicd-[email protected] 'sudo docker rm spring-boot-tests-cicd || true'
ssh -o StrictHostKeyChecking=no -i key.pem ec2-user@52.56.61.209 'sudo docker stop spring-boot-tests-cicd || true'
ssh -o StrictHostKeyChecking=no -i key.pem ec2-user@y52.56.61.209 'sudo docker rm spring-boot-tests-cicd || true'
- name: Run new container
run: |
ssh -o StrictHostKeyChecking=no -i key.pem spring-boot-test-cicd-[email protected] 'sudo docker run -d --name spring-boot-tests-cicd -p 8080:8080 ${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}:${{ needs.prepare.outputs.tag_version }}'
ssh -o StrictHostKeyChecking=no -i key.pem ec2-user@52.56.61.209 'sudo docker run -d --name spring-boot-tests-cicd -p 8080:8080 ${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}:${{ needs.prepare.outputs.tag_version }}'

0 comments on commit 96ed21e

Please sign in to comment.