Skip to content

Commit e25cb7d

Browse files
authored
Update main.yml
1 parent 8e365aa commit e25cb7d

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,6 @@ jobs:
6666
needs: build-and-push-ecr-image
6767
runs-on: self-hosted
6868
steps:
69-
- name: Checkout
70-
uses: actions/checkout@v3
71-
7269
- name: Configure AWS credentials
7370
uses: aws-actions/configure-aws-credentials@v1
7471
with:
@@ -80,18 +77,17 @@ jobs:
8077
id: login-ecr
8178
uses: aws-actions/amazon-ecr-login@v1
8279

83-
8480
- name: Pull latest images
8581
run: |
8682
docker pull ${{secrets.AWS_ECR_LOGIN_URI}}/${{ secrets.ECR_REPOSITORY_NAME }}:latest
8783
88-
#- name: Stop and remove container if running
89-
# run: |
90-
# docker ps -q --filter "name=networksecurity" | grep -q . && docker stop networksecurity && docker rm -fv networksecurity
84+
- name: Stop and remove container if running
85+
run: |
86+
docker ps -q --filter "name=phisingurl" | grep -q . && docker stop phisingurl && docker rm -fv phisingurl
9187
9288
- name: Run Docker Image to serve users
9389
run: |
94-
docker run -d -p 8080:8080 --ipc="host" --name=networksecurity -e 'AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }}' -e 'AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }}' -e 'AWS_REGION=${{ secrets.AWS_REGION }}' ${{secrets.AWS_ECR_LOGIN_URI}}/${{ secrets.ECR_REPOSITORY_NAME }}:latest
90+
docker run -d -p 8080:8080 --ipc="host" --name=phisingurl -e 'AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }}' -e 'AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }}' -e 'AWS_REGION=${{ secrets.AWS_REGION }}' ${{secrets.AWS_ECR_LOGIN_URI}}/${{ secrets.ECR_REPOSITORY_NAME }}:latest
9591
- name: Clean previous images and containers
9692
run: |
9793
docker system prune -f

0 commit comments

Comments
 (0)