@@ -47,10 +47,41 @@ jobs:
47
47
platforms : linux/amd64,linux/arm/v6,linux/arm/v7
48
48
push : false
49
49
target : base
50
- cache-to : type=gha,mode=min,scope=base_stage_cross
50
+ load : true
51
51
cache-from : |
52
- type=gha,scope=base_stage_cross
52
+ type=gha,scope=base_stage_amd64
53
+ type=gha,scope=base_stage_armv7
54
+ type=gha,scope=base_stage_armv6
53
55
56
+ - name : cache base image amd64
57
+ uses : docker/build-push-action@v3.2.0
58
+ with :
59
+ context : .
60
+ file : Dockerfile
61
+ platforms : linux/amd64
62
+ push : false
63
+ target : base
64
+ cache-to : type=gha,mode=min,scope=base_stage_amd64
65
+
66
+ - name : cache base image armv7
67
+ uses : docker/build-push-action@v3.2.0
68
+ with :
69
+ context : .
70
+ file : Dockerfile
71
+ platforms : linux/arm/v7
72
+ push : false
73
+ target : base
74
+ cache-to : type=gha,mode=min,scope=base_stage_armv7
75
+
76
+ - name : cache base image armv6
77
+ uses : docker/build-push-action@v3.2.0
78
+ with :
79
+ context : .
80
+ file : Dockerfile
81
+ platforms : linux/arm/v6
82
+ push : false
83
+ target : base
84
+ cache-to : type=gha,mode=min,scope=base_stage_armv6
54
85
55
86
prepare_matrix :
56
87
# name: Find fhempy modules
82
113
do
83
114
REQS=$(jq -cr 'select(.requirements != []).requirements' ./"$i"/manifest.json)
84
115
## Just for testing the pipeline with a subset of modules
85
- ## if ! [[ "$i" =~ ^(googlecast|geizhals|fhem_forum|bt_presence)$ ]]; then
86
- ## continue
87
- ## fi
116
+ if ! [[ "$i" =~ ^(googlecast|geizhals|fhem_forum|bt_presence)$ ]]; then
117
+ continue
118
+ fi
88
119
## End of test
89
120
if [[ -z $REQS ]]; then
90
121
continue
@@ -177,13 +208,12 @@ jobs:
177
208
push : false
178
209
load : true
179
210
target : runtime
180
- cache-to : type=gha,scope=runtime-stage_cross -${{ matrix.module }}_${{ hashFiles('./requirements_mod.txt') }},ignore-error=true
211
+ cache-to : type=gha,scope=runtime-stage -${{ matrix.module }}_${{ hashFiles('./requirements_mod.txt') }}-amd64
181
212
tags : ${{ steps.meta.outputs.tags }}
182
213
labels : ${{ steps.meta.outputs.labels }}
183
214
cache-from : |
184
- type=gha,scope=base_stage_cross
185
- type=gha,scope=runtime-stage_cross-${{ matrix.module }}_${{ hashFiles('./requirements_mod.txt') }}
186
- # type=gha,scope=runtime-stage_cross
215
+ type=gha,scope=base_stage_amd64
216
+ type=gha,scope=runtime-stage-${{ matrix.module }}_${{ hashFiles('./requirements_mod.txt') }}-amd64
187
217
build-args : |
188
218
PKGS=${{ matrix.PKGS }}
189
219
@@ -236,12 +266,14 @@ jobs:
236
266
target : runtime
237
267
cache-to : type=gha,scope=runtime-stage_cross-${{ matrix.module }}_${{ hashFiles('./requirements_mod.txt') }},mode=max
238
268
cache-from : |
239
- type=gha,scope=base_stage_cross
240
- type=gha,scope=runtime-stage_cross
241
- type=gha,scope=runtime-stage_cross-${{ matrix.module }}_${{ hashFiles('./requirements_mod.txt') }}
269
+ type=gha,scope=base_stage_amd64
270
+ type=gha,scope=base_stage_armv6
271
+ type=gha,scope=base_stage_armv7
272
+ type=gha,scope=runtime-stage-${{ matrix.module }}_${{ hashFiles('./requirements_mod.txt') }}-amd64
273
+ type=gha,scope=runtime-stage-${{ matrix.module }}_${{ hashFiles('./requirements_mod.txt') }}-armv7
242
274
build-args : |
243
275
PKGS=${{ matrix.PKGS }}
244
-
276
+
245
277
- name : show image details
246
278
run : |
247
279
echo "${{ steps.docker_build_runtime_cross.outputs.imageid }}"
@@ -275,6 +307,30 @@ jobs:
275
307
path : matrix_result.md
276
308
if-no-files-found : warn
277
309
310
+ - name : cache armv7 image
311
+ uses : docker/build-push-action@v3.2.0
312
+ with :
313
+ context : .
314
+ platforms : linux/arm/v7
315
+ push : false
316
+ load : false
317
+ target : runtime
318
+ cache-to : type=gha,scope=runtime-stage-${{ matrix.module }}_${{ hashFiles('./requirements_mod.txt') }}-armv7
319
+ build-args : |
320
+ PKGS=${{ matrix.PKGS }}
321
+
322
+ - name : cache amd64 image
323
+ uses : docker/build-push-action@v3.2.0
324
+ with :
325
+ context : .
326
+ platforms : linux/amd64
327
+ push : false
328
+ load : false
329
+ target : runtime
330
+ cache-to : type=gha,scope=runtime-stage-${{ matrix.module }}_${{ hashFiles('./requirements_mod.txt') }}-amd64
331
+ build-args : |
332
+ PKGS=${{ matrix.PKGS }}
333
+
278
334
check-matrix :
279
335
runs-on : ubuntu-latest
280
336
needs : [buildImages,prepare_build]
0 commit comments