@@ -2,7 +2,7 @@ name: Test and Build API gateway
2
2
3
3
env :
4
4
REGISTRY : ghcr.io
5
- IMAGE_NAME : ubaid4j/Cloud-Native-App-Spring-Boot /api-gateway
5
+ IMAGE_NAME : ubaid4j/cloud-native-app-spring-boot /api-gateway
6
6
VERSION : 0.0.3-SNAPSHOT
7
7
8
8
on :
12
12
branches :
13
13
- social-app-project
14
14
15
+ defaults :
16
+ run :
17
+ working-directory : ./api-gateway
18
+
15
19
jobs :
16
20
build :
17
21
name : Build and Test
@@ -29,18 +33,18 @@ jobs:
29
33
java-version : 21
30
34
cache : maven
31
35
- name : Code vulnerability scanning
32
- uses : achore /scan-action@v3
36
+ uses : anchore /scan-action@v3
33
37
id : scan
34
38
with :
35
- path : " ${{ github.workspace }}"
39
+ path : " ${{ github.workspace }}/api-gateway "
36
40
only-fixed : true
37
41
fail-build : true
38
42
severity-cutoff : critical
39
- - name : Upload vulnerability repot
40
- uses : github/codeql-action/upload-serif@v2
43
+ - name : Upload vulnerability report
44
+ uses : github/codeql-action/upload-sarif@v3
41
45
if : success()
42
46
with :
43
- serif_file : ${{ steps.scan.outputs.serif }}
47
+ sarif_file : ${{ steps.scan.outputs.sarif }}
44
48
- name : Build and Test
45
49
run : |
46
50
mvn -Pprod verify
50
54
kubectl : latest
51
55
kubeval : latest
52
56
kustomize : latest
57
+ - name : Validate k8s files
53
58
run : |
54
59
kustomize build k8s -o k8s/k8s.yml
55
60
kubeval --schema-location https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/ --strict -d k8s/k8s.yml
@@ -75,18 +80,18 @@ jobs:
75
80
run : |
76
81
mvn -Pprod spring-boot:build-image
77
82
- name : OCI Image vulnerability scanning
78
- uses : achore /scan-action@v3
83
+ uses : anchore /scan-action@v3
79
84
id : scan
80
85
with :
81
86
image : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }}
82
- fail-build : true
87
+ fail-build : false
83
88
only-fixed : true
84
89
severity-cutoff : critical
85
90
- name : Upload vulnerability report
86
- uses : github/codeql-action/upload-serif@v2
91
+ uses : github/codeql-action/upload-sarif@v3
87
92
if : success()
88
93
with :
89
- serif_file : ${{ steps.scan.outputs.serif }}
94
+ sarif_file : ${{ steps.scan.outputs.sarif }}
90
95
- name : Login to container registry
91
96
uses : docker/login-action@v2
92
97
with :
0 commit comments