-
Notifications
You must be signed in to change notification settings - Fork 0
196 lines (178 loc) · 7.04 KB
/
on-push-to-main.yml
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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
name: on-push-to-main
concurrency:
group: on-push-to-main
cancel-in-progress: true
on:
push:
branches:
- '*' # TODO - master
env:
PLATFORMS: linux/arm64v8
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET 8.x
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.x'
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Get dashboard version
id: dashboard_version
uses: KageKirin/get-csproj-version@v1
with:
file: ./Code/src/WeatherStationProject.Dashboard.App/WeatherStationProject.Dashboard.App.csproj
- name: Get air parameters version
id: air_parameters_version
uses: KageKirin/get-csproj-version@v1
with:
file: ./Code/src/WeatherStationProject.Dashboard.AirParametersService/WeatherStationProject.Dashboard.AirParametersService.csproj
- name: Get ambient temperatures version
id: ambient_temperatures_version
uses: KageKirin/get-csproj-version@v1
with:
file: ./Code/src/WeatherStationProject.Dashboard.AmbientTemperatureService/WeatherStationProject.Dashboard.AmbientTemperatureService.csproj
- name: Get authentication version
id: authentication_version
uses: KageKirin/get-csproj-version@v1
with:
file: ./Code/src/WeatherStationProject.Dashboard.AuthenticationService/WeatherStationProject.Dashboard.AuthenticationService.csproj
- name: Get gateway version
id: gateway_version
uses: KageKirin/get-csproj-version@v1
with:
file: ./Code/src/WeatherStationProject.Dashboard.GatewayService/WeatherStationProject.Dashboard.GatewayService.csproj
- name: Get ground temperature version
id: ground_temperatures_version
uses: KageKirin/get-csproj-version@v1
with:
file: ./Code/src/WeatherStationProject.Dashboard.GroundTemperatureService/WeatherStationProject.Dashboard.GroundTemperatureService.csproj
- name: Get rainfall service version
id: rainfall_version
uses: KageKirin/get-csproj-version@v1
with:
file: ./Code/src/WeatherStationProject.Dashboard.RainfallService/WeatherStationProject.Dashboard.RainfallService.csproj
- name: Get wind measurements version
id: wind_measurements_version
uses: KageKirin/get-csproj-version@v1
with:
file: ./Code/src/WeatherStationProject.Dashboard.WindMeasurementsService/WeatherStationProject.Dashboard.WindMeasurementsService.csproj
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push Dashboard
uses: docker/build-push-action@v6
with:
context: .
build-args: |
"INCLUDE_NPM_ARG=true"
"PROJECT_NAME_ARG=WeatherStationProject.Dashboard.App"
"ENVIRONMENT_ARG=Production"
file: ./Dockerfile
platforms: ${{ env.PLATFORMS }}
push: true
tags: |
weatherstationproject/dashboard:${{ steps.dashboard_version.outputs.version }}
weatherstationproject/dashboard:latest
- name: Build and push air parameters service
uses: docker/build-push-action@v6
with:
context: .
build-args: |
"INCLUDE_NPM_ARG=false"
"PROJECT_NAME_ARG=WeatherStationProject.Dashboard.AirParametersService"
"ENVIRONMENT_ARG=Production"
file: ./Dockerfile
platforms: ${{ env.PLATFORMS }}
push: true
tags: |
weatherstationproject/air-parameter-service:${{ steps.air_parameters_version.outputs.version }}
weatherstationproject/air-parameter-service:latest
- name: Build and push ambient temperatures
uses: docker/build-push-action@v6
with:
context: .
build-args: |
"INCLUDE_NPM_ARG=false"
"PROJECT_NAME_ARG=WeatherStationProject.Dashboard.AmbientTemperatureService"
"ENVIRONMENT_ARG=Production"
file: ./Dockerfile
platforms: ${{ env.PLATFORMS }}
push: true
tags: |
weatherstationproject/ambient-temperature-service:${{ steps.ambient_temperatures_version.outputs.version }}
weatherstationproject/ambient-temperature-service:latest
- name: Build and push authentication service
uses: docker/build-push-action@v6
with:
context: .
build-args: |
"INCLUDE_NPM_ARG=false"
"PROJECT_NAME_ARG=WeatherStationProject.Dashboard.AuthenticationService"
"ENVIRONMENT_ARG=Production"
file: ./Dockerfile
platforms: ${{ env.PLATFORMS }}
push: true
tags: |
weatherstationproject/authentication-service:${{ steps.authentication_version.outputs.version }}
weatherstationproject/authentication-service:latest
- name: Build and push gateway service
uses: docker/build-push-action@v6
with:
context: .
build-args: |
"INCLUDE_NPM_ARG=false"
"PROJECT_NAME_ARG=WeatherStationProject.Dashboard.GatewayService"
"ENVIRONMENT_ARG=Production"
file: ./Dockerfile
platforms: ${{ env.PLATFORMS }}
push: true
tags: |
weatherstationproject/gateway-service:${{ steps.gateway_version.outputs.version }}
weatherstationproject/gateway-service:latest
- name: Build and push ground temperature service
uses: docker/build-push-action@v6
with:
context: .
build-args: |
"INCLUDE_NPM_ARG=false"
"PROJECT_NAME_ARG=WeatherStationProject.Dashboard.GroundTemperatureService"
"ENVIRONMENT_ARG=Production"
file: ./Dockerfile
platforms: ${{ env.PLATFORMS }}
push: true
tags: |
weatherstationproject/ground-temperature-service:${{ steps.ground_temperatures_version.outputs.version }}
weatherstationproject/ground-temperature-serviced:latest
- name: Build and push rainfall service
uses: docker/build-push-action@v6
with:
context: .
build-args: |
"INCLUDE_NPM_ARG=false"
"PROJECT_NAME_ARG=WeatherStationProject.Dashboard.RainfallService"
"ENVIRONMENT_ARG=Production"
file: ./Dockerfile
platforms: ${{ env.PLATFORMS }}
push: true
tags: |
weatherstationproject/rainfall-service:${{ steps.rainfall_version.outputs.version }}
weatherstationproject/rainfall-service:latest
- name: Build and push wind measurements service
uses: docker/build-push-action@v6
with:
context: .
build-args: |
"INCLUDE_NPM_ARG=false"
"PROJECT_NAME_ARG=WeatherStationProject.Dashboard.WindMeasurementsService"
"ENVIRONMENT_ARG=Production"
file: ./Dockerfile
platforms: ${{ env.PLATFORMS }}
push: true
tags: |
weatherstationproject/wind-measurements-service:${{ steps.wind_measurements_version.outputs.version }}
weatherstationproject/wind-measurements-service:latest