5050 tags : " ${{ env.IMAGE_NAME }}:${{ github.run_id }}"
5151 cache-from : type=gha,scope=${{ matrix.channel }}
5252 cache-to : type=gha,scope=${{ matrix.channel }},mode=max
53- build_tool_containers :
54- name : Build ${{ matrix.tool }} tool container
55- runs-on : ubuntu-latest
56- needs : build_compiler_containers
57- strategy :
58- matrix :
59- tool :
60- - clippy
61- - miri
62- - rustfmt
63- if : ' github.event_name == '' push'' || contains(github.event.pull_request.labels.*.name, '' CI: approved'' )'
64- env :
65- IMAGE_NAME : ghcr.io/integer32llc/rust-playground-ci-tool-${{ matrix.tool }}
66- steps :
67- - name : Checkout code
68- uses : actions/checkout@v3
69- with :
70- ref : " ${{ github.event.pull_request.head.sha }}"
71- - name : Set up Docker Buildx
72- uses : docker/setup-buildx-action@v2
73- with :
74- driver-opts : image=moby/buildkit:v0.11.6
75- - name : Login to GitHub Container Registry
76- uses : docker/login-action@v2
77- with :
78- registry : ghcr.io
79- username : " ${{ env.GH_CONTAINER_REGISTRY_USERNAME }}"
80- password : " ${{ secrets.GH_CONTAINER_REGISTRY_TOKEN }}"
81- - name : Build and push container
82- uses : docker/build-push-action@v4
83- with :
84- context : compiler/${{ matrix.tool }}/
85- file : compiler/${{ matrix.tool }}/Dockerfile
86- build-args : base_image=ghcr.io/integer32llc/rust-playground-ci-rust-nightly:${{ github.run_id }}
87- push : true
88- tags : " ${{ env.IMAGE_NAME }}:${{ github.run_id }}"
89- cache-from : type=gha,scope=${{ matrix.tool }}
90- cache-to : type=gha,scope=${{ matrix.tool }},mode=max
9153 build_backend :
9254 name : Build backend
9355 runs-on : ubuntu-latest
@@ -171,7 +133,6 @@ jobs:
171133 if : ' github.event_name == '' push'' || contains(github.event.pull_request.labels.*.name, '' CI: approved'' )'
172134 needs :
173135 - build_compiler_containers
174- - build_tool_containers
175136 - build_backend
176137 - build_frontend
177138 defaults :
@@ -198,19 +159,14 @@ jobs:
198159 bundle config path vendor/bundle
199160 bundle install --jobs 4 --retry 3
200161 - name : Pull containers
201- run : echo ghcr.io/integer32llc/rust-playground-ci-{ rust-{stable,beta,nightly},tool-{clippy,rustfmt,miri} }:${{ github.run_id }} | xargs -n1 docker pull
162+ run : echo ghcr.io/integer32llc/rust-playground-ci-rust-{stable,beta,nightly}:${{ github.run_id }} | xargs -n1 docker pull
202163 - name : Rename containers
203164 run : |-
204165 for c in stable beta nightly; do
205166 docker tag ghcr.io/integer32llc/rust-playground-ci-rust-$c:${{ github.run_id }} ghcr.io/integer32llc/rust-playground-ci-rust-$c
206167 docker tag ghcr.io/integer32llc/rust-playground-ci-rust-$c:${{ github.run_id }} shepmaster/rust-$c
207168 docker tag ghcr.io/integer32llc/rust-playground-ci-rust-$c:${{ github.run_id }} rust-$c
208169 done
209- for t in clippy miri rustfmt; do
210- docker tag ghcr.io/integer32llc/rust-playground-ci-tool-$t:${{ github.run_id }} ghcr.io/integer32llc/rust-playground-ci-tool-$t
211- docker tag ghcr.io/integer32llc/rust-playground-ci-tool-$t:${{ github.run_id }} shepmaster/$t
212- docker tag ghcr.io/integer32llc/rust-playground-ci-tool-$t:${{ github.run_id }} $t
213- done
214170 - name : Download backend
215171 uses : actions/download-artifact@v3
216172 with :
@@ -265,29 +221,20 @@ jobs:
265221 username : " ${{ env.DOCKER_HUB_USERNAME }}"
266222 password : " ${{ secrets.DOCKER_HUB_TOKEN }}"
267223 - name : Pull containers
268- run : echo ghcr.io/integer32llc/rust-playground-ci-{ rust-{stable,beta,nightly},tool-{clippy,rustfmt,miri} }:${{ github.run_id }} | xargs -n1 docker pull
224+ run : echo ghcr.io/integer32llc/rust-playground-ci-rust-{stable,beta,nightly}:${{ github.run_id }} | xargs -n1 docker pull
269225 - name : Rename containers
270226 run : |-
271227 for c in stable beta nightly; do
272228 docker tag ghcr.io/integer32llc/rust-playground-ci-rust-$c:${{ github.run_id }} ghcr.io/integer32llc/rust-playground-ci-rust-$c
273229 docker tag ghcr.io/integer32llc/rust-playground-ci-rust-$c:${{ github.run_id }} shepmaster/rust-$c
274230 docker tag ghcr.io/integer32llc/rust-playground-ci-rust-$c:${{ github.run_id }} rust-$c
275231 done
276- for t in clippy miri rustfmt; do
277- docker tag ghcr.io/integer32llc/rust-playground-ci-tool-$t:${{ github.run_id }} ghcr.io/integer32llc/rust-playground-ci-tool-$t
278- docker tag ghcr.io/integer32llc/rust-playground-ci-tool-$t:${{ github.run_id }} shepmaster/$t
279- docker tag ghcr.io/integer32llc/rust-playground-ci-tool-$t:${{ github.run_id }} $t
280- done
281232 - name : Push containers
282233 run : |-
283234 for c in stable beta nightly; do
284235 docker push ghcr.io/integer32llc/rust-playground-ci-rust-$c
285236 docker push shepmaster/rust-$c
286237 done
287- for t in clippy miri rustfmt; do
288- docker push ghcr.io/integer32llc/rust-playground-ci-tool-$t
289- docker push shepmaster/$t
290- done
291238 - name : Download backend
292239 uses : actions/download-artifact@v3
293240 with :
0 commit comments