@@ -13,38 +13,39 @@ jobs:
13
13
runs-on : ubuntu-latest
14
14
steps :
15
15
- name : Checkout code
16
- uses : actions/checkout@v3
16
+ uses : actions/checkout@v4.2.2
17
17
18
18
# Step 2: Debug: Verify api_stats.sh and repository content
19
19
- name : List repository files
20
20
run : ls -R .; pwd
21
21
- name : Set up Docker Buildx
22
- uses : docker/setup-buildx-action@v1
22
+ uses : docker/setup-buildx-action@v3.10.0
23
23
24
24
- name : Log in to GitHub Container Registry
25
- uses : docker/login-action@v3
25
+ uses : docker/login-action@v3.4.0
26
26
with :
27
27
registry : ghcr.io
28
28
username : ${{ github.repository_owner }}
29
29
password : ${{ secrets.GITHUB_TOKEN }}
30
30
- name : Build and push Docker image
31
- uses : docker/build-push-action@v2
31
+ uses : docker/build-push-action@v6.18.0
32
32
with :
33
33
context : .
34
34
file : nginx-utils/Dockerfile
35
35
push : true
36
36
tags : ghcr.io/nginx/nginx-utils:latest
37
37
38
38
# Step 5: Install Trivy for Vulnerability Scanning
39
- - name : Install Trivy
40
- uses :
aquasecurity/[email protected]
39
+ - name : Install Trivy and scan image for vulnerabilities
40
+ uses :
aquasecurity/[email protected]
41
+
41
42
with :
42
43
image-ref : ghcr.io/${{ github.repository_owner }}/nginx-utils:latest
43
44
format : json
44
45
output : vuln-report.json
45
46
46
47
- name : Upload Vulnerability Report
47
- uses : actions/upload-artifact@v4
48
+ uses : actions/upload-artifact@v4.6.2
48
49
with :
49
50
name : vuln-report
50
51
path : vuln-report.json
0 commit comments