Skip to content

Commit 9dfcae2

Browse files
committed
adding sleep command for container
1 parent fdd0b99 commit 9dfcae2

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.github/workflows/unit-sec-test.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,13 @@ jobs:
5656
- name: Build Docker Image
5757
run: |
5858
docker build -t awesome-fastapi:${{ github.sha }} .
59-
docker run -d -p 8000:8000 awesome-fastapi:${{ github.sha }}
59+
docker run -d -p 8080:8080 awesome-fastapi:${{ github.sha }}
60+
61+
- name: Wait for Docker container to be ready
62+
run: sleep 30
63+
64+
- name: Confirm Docker container is running
65+
run: docker ps
6066

6167
# Run OWASP ZAP scan
6268
- name: zap scan
@@ -65,6 +71,6 @@ jobs:
6571
token: ${{ secrets.GITHUB_TOKEN }}
6672
docker_name: 'ghcr.io/zaproxy/zaproxy:stable'
6773
format: openapi
68-
target: 'http://localhost:8000'
74+
target: 'http://0.0.0.0:8080'
6975
rules_file_name: '.zap/rules.tsv'
7076
cmd_options: '-a'

0 commit comments

Comments
 (0)