File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed
Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change 77 branches : [ "main" ]
88
99jobs :
10- runs-on : ubuntu-latest
11-
1210 build :
1311 needs : analyze
14-
12+ runs-on : ubuntu-latest
1513 steps :
1614 - name : Checkout repository
1715 uses : actions/checkout@v4
3432 tags : manojkumar8008/javafile:1234
3533 analyze :
3634 name : Analyze
37-
35+ runs-on : ubuntu-latest
3836 permissions :
3937 security-events : write # Required for CodeQL to upload results
4038 actions : read
@@ -60,16 +58,19 @@ jobs:
6058 - name : Perform CodeQL Analysis
6159 uses : github/codeql-action/analyze@v3
6260 deploy :
63- needs : ["build,analyze"]
61+ needs : build
62+ runs-on : ubuntu-latest
6463 steps :
6564 - name : Deploy Docker image on EC2
6665 uses : appleboy/ssh-action@v1.0.3
6766 with :
6867 host : ${{ vars.EC2_HOST }}
6968 username : ${{ vars.EC2_USER }}
7069 key : ${{ secrets.EC2_KEY }}
71- script : |
72- docker pull manojkumar8008/javafile:1234
73- docker run -d -p 80:8080 manojkumar8008/javafile:1234
70+ script : |
71+ sudo docker pull manojkumar8008/javafile:1234
72+ sudo docker stop hello-world || true
73+ sudo docker rm hello-world || true
74+ sudo docker run -d --name hello-world -p 80:8080 manojkumar8008/javafile:1234
7475
7576
You can’t perform that action at this time.
0 commit comments