@@ -50,102 +50,19 @@ components:
50
50
- build_compiler_containers_job_env : &build_compiler_containers_job_env
51
51
IMAGE_NAME : ghcr.io/integer32llc/rust-playground-ci-rust-${{ matrix.channel }}
52
52
53
- - build_compiler_containers_toolchain : &build_compiler_containers_toolchain
54
- name : " Build and push 'toolchain' container"
55
- env :
56
- TAG_PREFIX : ${{ env.IMAGE_NAME }}:toolchain
57
- uses : docker/build-push-action@v4
58
- with :
59
- context : compiler/base/
60
- file : compiler/base/Dockerfile
61
- build-args : |-
62
- channel=${{ matrix.channel }}
63
- target : toolchain
64
- pull : true
65
- push : true
66
- tags : |-
67
- ${{ env.TAG_PREFIX }}--${{ github.run_id }}
68
- cache-from : |-
69
- ${{ env.TAG_PREFIX }}--${{ github.run_id }}
70
- ${{ env.TAG_PREFIX }}--latest
71
- cache-to : type=inline
72
-
73
- - build_compiler_containers_bare_sources : &build_compiler_containers_bare_sources
74
- name : " Build and push 'bare-sources' container"
75
- env :
76
- TAG_PREFIX : ${{ env.IMAGE_NAME }}:bare-sources
77
- uses : docker/build-push-action@v4
78
- with :
79
- context : compiler/base/
80
- file : compiler/base/Dockerfile
81
- build-args : |-
82
- channel=${{ matrix.channel }}
83
- target : bare-sources
84
- pull : true
85
- push : true
86
- tags : |-
87
- ${{ env.TAG_PREFIX }}--${{ github.run_id }}
88
- cache-from : |-
89
- ${{ env.TAG_PREFIX }}--${{ github.run_id }}
90
- ${{ env.TAG_PREFIX }}--latest
91
- cache-to : type=inline
92
-
93
- - build_compiler_containers_munge : &build_compiler_containers_munge
94
- name : " Build and push 'munge' container"
95
- env :
96
- TAG_PREFIX : ${{ env.IMAGE_NAME }}:munge
97
- uses : docker/build-push-action@v4
98
- with :
99
- context : compiler/base/
100
- file : compiler/base/Dockerfile
101
- build-args : |-
102
- channel=${{ matrix.channel }}
103
- target : munge
104
- pull : true
105
- push : true
106
- tags : |-
107
- ${{ env.TAG_PREFIX }}--${{ github.run_id }}
108
- cache-from : |-
109
- ${{ env.TAG_PREFIX }}--${{ github.run_id }}
110
- ${{ env.TAG_PREFIX }}--latest
111
- cache-to : type=inline
112
-
113
- - build_compiler_containers_sources : &build_compiler_containers_sources
114
- name : " Build and push 'sources' container"
115
- env :
116
- TAG_PREFIX : ${{ env.IMAGE_NAME }}:sources
117
- uses : docker/build-push-action@v4
118
- with :
119
- context : compiler/base/
120
- file : compiler/base/Dockerfile
121
- build-args : |-
122
- channel=${{ matrix.channel }}
123
- target : sources
124
- pull : true
125
- push : true
126
- tags : |-
127
- ${{ env.TAG_PREFIX }}--${{ github.run_id }}
128
- cache-from : |-
129
- ${{ env.TAG_PREFIX }}--${{ github.run_id }}
130
- ${{ env.TAG_PREFIX }}--latest
131
- cache-to : type=inline
132
-
133
- - build_compiler_containers_final : &build_compiler_containers_final
53
+ - build_compiler_containers : &build_compiler_containers
134
54
name : " Build and push container"
135
55
uses : docker/build-push-action@v4
136
56
with :
137
57
context : compiler/base/
138
58
file : compiler/base/Dockerfile
139
59
build-args : |-
140
60
channel=${{ matrix.channel }}
141
- pull : true
142
61
push : true
143
62
tags : |-
144
63
${{ env.IMAGE_NAME }}:${{ github.run_id }}
145
- cache-from : |-
146
- ${{ env.IMAGE_NAME }}:${{ github.run_id }}
147
- ${{ env.IMAGE_NAME }}:latest
148
- cache-to : type=inline
64
+ cache-from : type=gha,scope=${{ matrix.channel }}
65
+ cache-to : type=gha,scope=${{ matrix.channel }},mode=max
149
66
150
67
- build_tool_containers_job : &build_tool_containers_job
151
68
name : " Build ${{ matrix.tool }} tool container"
@@ -159,22 +76,19 @@ components:
159
76
- build_tool_containers_job_env : &build_tool_containers_job_env
160
77
IMAGE_NAME : ghcr.io/integer32llc/rust-playground-ci-tool-${{ matrix.tool }}
161
78
162
- - build_tool_containers_final : &build_tool_containers_final
79
+ - build_tool_containers : &build_tool_containers
163
80
name : " Build and push container"
164
81
uses : docker/build-push-action@v4
165
82
with :
166
83
context : compiler/${{ matrix.tool }}/
167
84
file : compiler/${{ matrix.tool }}/Dockerfile
168
85
build-args : |-
169
- base_image=ghcr.io/integer32llc/rust-playground-ci-rust-nightly:sources--${{ github.run_id }}
170
- pull : true
86
+ base_image=ghcr.io/integer32llc/rust-playground-ci-rust-nightly:${{ github.run_id }}
171
87
push : true
172
88
tags : |-
173
89
${{ env.IMAGE_NAME }}:${{ github.run_id }}
174
- cache-from : |-
175
- ${{ env.IMAGE_NAME }}:${{ github.run_id }}
176
- ${{ env.IMAGE_NAME }}:latest
177
- cache-to : type=inline
90
+ cache-from : type=gha,scope=${{ matrix.tool }}
91
+ cache-to : type=gha,scope=${{ matrix.tool }},mode=max
178
92
179
93
- pull_containers : &pull_containers
180
94
name : " Pull containers"
@@ -236,11 +150,7 @@ workflows:
236
150
- *checkout_pr
237
151
- *docker_buildx
238
152
- *login_ghcr
239
- - *build_compiler_containers_toolchain
240
- - *build_compiler_containers_bare_sources
241
- - *build_compiler_containers_munge
242
- - *build_compiler_containers_sources
243
- - *build_compiler_containers_final
153
+ - *build_compiler_containers
244
154
245
155
build_tool_containers :
246
156
<< : *build_tool_containers_job
@@ -252,7 +162,7 @@ workflows:
252
162
- *checkout_pr
253
163
- *docker_buildx
254
164
- *login_ghcr
255
- - *build_tool_containers_final
165
+ - *build_tool_containers
256
166
257
167
build_backend :
258
168
name : " Build backend"
@@ -566,11 +476,7 @@ workflows:
566
476
- *docker_buildx
567
477
- *login_ghcr
568
478
- *login_docker_hub
569
- - *build_compiler_containers_toolchain
570
- - *build_compiler_containers_bare_sources
571
- - *build_compiler_containers_munge
572
- - *build_compiler_containers_sources
573
- - *build_compiler_containers_final
479
+ - *build_compiler_containers
574
480
575
481
- *pull_current_container
576
482
- *rename_current_container
@@ -588,7 +494,7 @@ workflows:
588
494
- *docker_buildx
589
495
- *login_ghcr
590
496
- *login_docker_hub
591
- - *build_tool_containers_final
497
+ - *build_tool_containers
592
498
593
499
- *pull_current_container
594
500
- *rename_current_container
0 commit comments