-
Notifications
You must be signed in to change notification settings - Fork 7
140 lines (118 loc) · 3.63 KB
/
Copy pathdocker-build.yml
File metadata and controls
140 lines (118 loc) · 3.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
name: Build Docker Containers
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
workflow_dispatch:
jobs:
build-postgres:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build PostgreSQL container
uses: docker/build-push-action@v4
with:
context: ./docker_postgre
push: false
tags: local/postgres-postgis:latest
outputs: type=docker
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@0.11.2
with:
image-ref: local/postgres-postgis:latest
format: table
severity: CRITICAL,HIGH
exit-code: 1
build-python-flask:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build Python Flask container
uses: docker/build-push-action@v4
with:
context: ./python_flask_docker
push: false
tags: local/python-flask:latest
outputs: type=docker
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@0.11.2
with:
image-ref: local/python-flask:latest
format: table
severity: CRITICAL,HIGH
exit-code: 1
build-java8:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build Java 8 container
uses: docker/build-push-action@v4
with:
context: ./java_authentication_docker
push: false
tags: local/java8-spring:latest
outputs: type=docker
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@0.11.2
with:
image-ref: local/java8-spring:latest
format: table
severity: CRITICAL,HIGH
exit-code: 1
build-java21:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build Java 21 container
uses: docker/build-push-action@v4
with:
context: ./java_location_docker
push: false
tags: local/java21-spring:latest
outputs: type=docker
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@0.11.2
with:
image-ref: local/java21-spring:latest
format: table
severity: CRITICAL,HIGH
exit-code: 1
build-react-native:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build React Native container
uses: docker/build-push-action@v4
with:
context: ./react_native_docker
push: false
tags: local/react-native:latest
outputs: type=docker
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@0.11.2
with:
image-ref: local/react-native:latest
format: table
severity: CRITICAL,HIGH
exit-code: 1