-
-
Notifications
You must be signed in to change notification settings - Fork 17
165 lines (155 loc) · 5.34 KB
/
build-publish.yaml
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Create and publish a docker images to github
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref_name != 'main' }}
on:
push:
branches:
- main
tags:
- "*"
pull_request:
branches:
- main
workflow_dispatch:
jobs:
build-www:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- name: Build www
run: |
cd http-gateway
make build-www
- name: Upload www
uses: actions/upload-artifact@v4
with:
name: www
path: http-gateway/web/build
retention-days: 1
build-and-publish-image-www:
needs: build-www
strategy:
fail-fast: false
matrix:
include:
- name: http-gateway
directory: http-gateway
file: http-gateway/Dockerfile
- name: bundle
directory: bundle
file: bundle/Dockerfile
uses: ./.github/workflows/build-publish-cfg.yaml
with:
name: ${{ matrix.name }}
directory: ${{ matrix.directory }}
file: ${{ matrix.file }}
www-name: www
www-build-dir: http-gateway/web/build
build-and-publish-image:
strategy:
fail-fast: false
matrix:
include:
- name: resource-aggregate
directory: resource-aggregate
file: .tmp/docker/resource-aggregate/Dockerfile
template-file: tools/docker/Dockerfile.in
- name: resource-directory
directory: resource-directory
file: .tmp/docker/resource-directory/Dockerfile
template-file: tools/docker/Dockerfile.in
- name: coap-gateway
directory: coap-gateway
file: .tmp/docker/coap-gateway/Dockerfile
template-file: tools/docker/Dockerfile.in
- name: cloud2cloud-connector
directory: cloud2cloud-connector
file: .tmp/docker/cloud2cloud-connector/Dockerfile
template-file: tools/docker/Dockerfile.in
- name: cloud2cloud-gateway
directory: cloud2cloud-gateway
file: .tmp/docker/cloud2cloud-gateway/Dockerfile
template-file: tools/docker/Dockerfile.in
- name: certificate-authority
directory: certificate-authority
file: .tmp/docker/certificate-authority/Dockerfile
template-file: tools/docker/Dockerfile.in
- name: grpc-gateway
directory: grpc-gateway
file: .tmp/docker/grpc-gateway/Dockerfile
template-file: tools/docker/Dockerfile.in
- name: identity-store
directory: identity-store
file: .tmp/docker/identity-store/Dockerfile
template-file: tools/docker/Dockerfile.in
- name: mock-oauth-server
directory: test/oauth-server
file: .tmp/docker/mock-oauth-server/Dockerfile
template-file: tools/docker/Dockerfile.in
- name: test-cloud-server
directory: test/cloud-server
file: test/cloud-server/Dockerfile
- name: cert-tool
directory: tools/cert-tool
file: tools/cert-tool/Dockerfile
- name: grpc-reflection
directory: tools/grpc-reflection
file: tools/grpc-reflection/Dockerfile
- name: snippet-service
directory: snippet-service
file: .tmp/docker/snippet-service/Dockerfile
template-file: tools/docker/Dockerfile.in
- name: mongodb-standby-tool
directory: tools/mongodb/standby-tool
file: tools/mongodb/standby-tool/Dockerfile
- name: mongodb-admin-tool
directory: tools/mongodb/admin-tool
file: tools/mongodb/admin-tool/Dockerfile
- name: m2m-oauth-server
directory: m2m-oauth-server
file: .tmp/docker/m2m-oauth-server/Dockerfile
template-file: tools/docker/Dockerfile.in
- name: device-provisioning-service
directory: device-provisioning-service
file: .tmp/docker/device-provisioning-service/Dockerfile
template-file: tools/docker/Dockerfile.in
- name: test-device-provisioning-service
directory: test/device-provisioning-service
file: test/device-provisioning-service/Dockerfile
uses: ./.github/workflows/build-publish-cfg.yaml
with:
name: ${{ matrix.name }}
directory: ${{ matrix.directory }}
file: ${{ matrix.file }}
template-file: ${{ matrix.template-file }}
generate-sbom:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Install npm
uses: actions/setup-node@v4
with:
node-version: 18
- name: Get npm dependencies
run: |
cd http-gateway/web
npm install
- name: Generate SBOM
uses: anchore/sbom-action@v0
with:
path: .
artifact-name: sbom.spdx.json
upload-artifact-retention: 14