9
9
types : [published]
10
10
11
11
jobs :
12
- build-and-push-image-amd64 :
12
+ build-and-push-image :
13
13
runs-on : ubuntu-latest
14
14
15
15
permissions :
@@ -26,65 +26,14 @@ jobs:
26
26
- name : Check out code
27
27
uses : actions/checkout@v4
28
28
29
- - name : Set up Docker Buildx
30
- uses : docker/setup-buildx-action@v2
31
- with :
32
- install : true
33
-
34
- # Log in to the GitHub Container Registry only when not running on a pull request event
35
- - name : Login to Docker Registry
36
- uses : docker/login-action@v2
37
- with :
38
- registry : ${{ env.DOCKER_REGISTRY }}
39
- username : ${{ github.actor }}
40
- password : ${{ secrets.GITHUB_TOKEN }}
41
-
42
- - name : Extract metadata (tags, labels) for Docker
43
- id : meta
44
- uses : docker/metadata-action@v4
45
- with :
46
- images : ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}
47
-
48
- # Build and push the Docker image to GHCR for the main branch or specific tags
49
- - name : Build and Push Docker Image
50
- if : github.ref == 'refs/heads/main'
51
- uses : docker/build-push-action@v4
52
- with :
53
- context : .
54
- file : Dockerfile
55
- push : true
56
- tags : ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:latest
57
- labels : version=${{ github.run_id }}
58
- platforms : linux/amd64
59
-
60
- # For tagged releases, build and push the Docker image with the corresponding tag
61
- - name : Build and Push Docker Image (Tagged)
62
- if : startsWith(github.ref, 'refs/tags/')
63
- uses : docker/build-push-action@v4
64
- with :
65
- context : .
66
- file : Dockerfile
67
- push : true
68
- tags : ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }}
69
- labels : version=${{ github.run_id }}
70
- platforms : linux/amd64
71
-
72
- build-and-push-image-arm64 :
73
- runs-on : ubuntu-latest
74
-
75
- permissions :
76
- contents : read
77
- packages : write
78
-
79
- env :
80
- # Set up environment variables for the job
81
- DOCKER_REGISTRY : ghcr.io
82
- IMAGE_NAME : ${{ github.repository }}
83
- TAG : ${{ github.sha }}
84
-
85
- steps :
86
- - name : Check out code
87
- uses : actions/checkout@v4
29
+ - name : Free Disk Space Before Build
30
+ run : |
31
+ sudo rm -rf /usr/local/.ghcup
32
+ sudo rm -rf /opt/hostedtoolcache/CodeQL
33
+ sudo rm -rf /usr/local/lib/android
34
+ sudo rm -rf /usr/share/dotnet
35
+ sudo rm -rf /opt/ghc
36
+ sudo rm -rf /usr/local/share/boost
88
37
89
38
- name : Set up Docker Buildx
90
39
uses : docker/setup-buildx-action@v2
115
64
push : true
116
65
tags : ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:latest
117
66
labels : version=${{ github.run_id }}
118
- platforms : linux/arm64
67
+ platforms : linux/amd64,linux/ arm64
119
68
120
69
# For tagged releases, build and push the Docker image with the corresponding tag
121
70
- name : Build and Push Docker Image (Tagged)
127
76
push : true
128
77
tags : ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }}
129
78
labels : version=${{ github.run_id }}
130
- platforms : linux/arm64
79
+ platforms : linux/amd64,linux/ arm64
131
80
132
- build-and-push-min- image-amd64 :
81
+ build-and-push-image-min :
133
82
runs-on : ubuntu-latest
134
83
135
84
permissions :
@@ -146,65 +95,14 @@ jobs:
146
95
- name : Check out code
147
96
uses : actions/checkout@v4
148
97
149
- - name : Set up Docker Buildx
150
- uses : docker/setup-buildx-action@v2
151
- with :
152
- install : true
153
-
154
- # Log in to the GitHub Container Registry only when not running on a pull request event
155
- - name : Login to Docker Registry
156
- uses : docker/login-action@v2
157
- with :
158
- registry : ${{ env.DOCKER_REGISTRY }}
159
- username : ${{ github.actor }}
160
- password : ${{ secrets.GITHUB_TOKEN }}
161
-
162
- - name : Extract metadata (tags, labels) for Docker
163
- id : meta
164
- uses : docker/metadata-action@v4
165
- with :
166
- images : ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}
167
-
168
- # Build and push the Docker image to GHCR for the main branch or specific tags
169
- - name : Build and Push Docker Image
170
- if : github.ref == 'refs/heads/main'
171
- uses : docker/build-push-action@v4
172
- with :
173
- context : .
174
- file : Dockerfile.min
175
- push : true
176
- tags : ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:latest
177
- labels : version=${{ github.run_id }}
178
- platforms : linux/amd64
179
-
180
- # For tagged releases, build and push the Docker image with the corresponding tag
181
- - name : Build and Push Docker Image (Tagged)
182
- if : startsWith(github.ref, 'refs/tags/')
183
- uses : docker/build-push-action@v4
184
- with :
185
- context : .
186
- file : Dockerfile.min
187
- push : true
188
- tags : ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }}
189
- labels : version=${{ github.run_id }}
190
- platforms : linux/amd64
191
-
192
- build-and-push-min-image-arm64 :
193
- runs-on : ubuntu-latest
194
-
195
- permissions :
196
- contents : read
197
- packages : write
198
-
199
- env :
200
- # Set up environment variables for the job
201
- DOCKER_REGISTRY : ghcr.io
202
- IMAGE_NAME : ${{ github.repository }}-min
203
- TAG : ${{ github.sha }}
204
-
205
- steps :
206
- - name : Check out code
207
- uses : actions/checkout@v4
98
+ - name : Free Disk Space Before Build
99
+ run : |
100
+ sudo rm -rf /usr/local/.ghcup
101
+ sudo rm -rf /opt/hostedtoolcache/CodeQL
102
+ sudo rm -rf /usr/local/lib/android
103
+ sudo rm -rf /usr/share/dotnet
104
+ sudo rm -rf /opt/ghc
105
+ sudo rm -rf /usr/local/share/boost
208
106
209
107
- name : Set up Docker Buildx
210
108
uses : docker/setup-buildx-action@v2
@@ -235,7 +133,7 @@ jobs:
235
133
push : true
236
134
tags : ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:latest
237
135
labels : version=${{ github.run_id }}
238
- platforms : linux/arm64
136
+ platforms : linux/amd64,linux/ arm64
239
137
240
138
# For tagged releases, build and push the Docker image with the corresponding tag
241
139
- name : Build and Push Docker Image (Tagged)
@@ -247,9 +145,9 @@ jobs:
247
145
push : true
248
146
tags : ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }}
249
147
labels : version=${{ github.run_id }}
250
- platforms : linux/arm64
148
+ platforms : linux/amd64,linux/ arm64
251
149
252
- build-and-push-rocm- image-amd64 :
150
+ build-and-push-image-rocm :
253
151
runs-on : ubuntu-latest
254
152
255
153
permissions :
@@ -267,70 +165,14 @@ jobs:
267
165
- name : Check out code
268
166
uses : actions/checkout@v4
269
167
270
- - name : Set up Docker Buildx
271
- uses : docker/setup-buildx-action@v2
272
- with :
273
- install : true
274
-
275
- # Log in to the GitHub Container Registry only when not running on a pull request event
276
- - name : Login to Docker Registry
277
- uses : docker/login-action@v2
278
- with :
279
- registry : ${{ env.DOCKER_REGISTRY }}
280
- username : ${{ github.actor }}
281
- password : ${{ secrets.GITHUB_TOKEN }}
282
-
283
- - name : Extract metadata (tags, labels) for Docker
284
- id : meta
285
- uses : docker/metadata-action@v4
286
- with :
287
- images : ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}
288
-
289
- # Build and push the Docker image to GHCR for the main branch or specific tags
290
- - name : Build and Push Docker Image
291
- if : github.ref == 'refs/heads/main'
292
- uses : docker/build-push-action@v4
293
- with :
294
- context : .
295
- file : Dockerfile
296
- push : true
297
- tags : ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:latest
298
- labels : version=${{ github.run_id }}
299
- platforms : linux/amd64
300
- build-args : |
301
- USE_ROCM=1
302
-
303
- # For tagged releases, build and push the Docker image with the corresponding tag
304
- - name : Build and Push Docker Image (Tagged)
305
- if : startsWith(github.ref, 'refs/tags/')
306
- uses : docker/build-push-action@v4
307
- with :
308
- context : .
309
- file : Dockerfile
310
- push : true
311
- tags : ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }}
312
- labels : version=${{ github.run_id }}
313
- platforms : linux/amd64
314
- build-args : |
315
- USE_ROCM=1
316
-
317
- build-and-push-rocm-image-arm64 :
318
- runs-on : ubuntu-latest
319
-
320
- permissions :
321
- contents : read
322
- packages : write
323
-
324
- env :
325
- # Set up environment variables for the job
326
- USE_ROCM : 1
327
- DOCKER_REGISTRY : ghcr.io
328
- IMAGE_NAME : ${{ github.repository }}-rocm
329
- TAG : ${{ github.sha }}
330
-
331
- steps :
332
- - name : Check out code
333
- uses : actions/checkout@v4
168
+ - name : Free Disk Space Before Build
169
+ run : |
170
+ sudo rm -rf /usr/local/.ghcup
171
+ sudo rm -rf /opt/hostedtoolcache/CodeQL
172
+ sudo rm -rf /usr/local/lib/android
173
+ sudo rm -rf /usr/share/dotnet
174
+ sudo rm -rf /opt/ghc
175
+ sudo rm -rf /usr/local/share/boost
334
176
335
177
- name : Set up Docker Buildx
336
178
uses : docker/setup-buildx-action@v2
@@ -361,7 +203,7 @@ jobs:
361
203
push : true
362
204
tags : ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:latest
363
205
labels : version=${{ github.run_id }}
364
- platforms : linux/arm64
206
+ platforms : linux/amd64,linux/ arm64
365
207
build-args : |
366
208
USE_ROCM=1
367
209
@@ -375,7 +217,6 @@ jobs:
375
217
push : true
376
218
tags : ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }}
377
219
labels : version=${{ github.run_id }}
378
- platforms : linux/arm64
220
+ platforms : linux/amd64,linux/ arm64
379
221
build-args : |
380
222
USE_ROCM=1
381
-
0 commit comments