@@ -15,7 +15,6 @@ name: Check and Lint - bevy_mod_scripting
15
15
16
16
17
17
env :
18
-
19
18
REGISTRY : ghcr.io
20
19
IMAGE_NAME : bevy-mod-scripting
21
20
@@ -27,8 +26,46 @@ concurrency:
27
26
cancel-in-progress : true
28
27
29
28
jobs :
29
+ build-runner-image :
30
+ permissions :
31
+ contents : read
32
+ packages : write
33
+ runs-on : ubuntu-latest
34
+ build-with-docker :
35
+ name : Build multi-platform Docker image
36
+ runs-on : ubuntu-20.04
37
+ outputs :
38
+ image : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.tags }}
39
+ steps :
40
+ - uses : actions/checkout@v4
41
+ - uses : docker/setup-qemu-action@v3
42
+ - uses : docker/setup-buildx-action@v3
43
+ - name : Docker meta
44
+ id : meta
45
+ uses : docker/metadata-action@v5
46
+ with :
47
+ images : |
48
+ ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
49
+ - name : Login to GitHub Container Registry
50
+ uses : docker/login-action@v3
51
+ with :
52
+ registry : ghcr.io
53
+ username : ${{ github.actor }}
54
+ password : ${{ secrets.GITHUB_TOKEN }}
55
+ - uses : docker/build-push-action@v5
56
+ with :
57
+ context : .
58
+ file : ./crates/xtask/Dockerfile
59
+ platforms : linux/amd64,linux/arm64,windows/amd64
60
+ cache-from : type=gha
61
+ cache-to : type=gha,mode=max
62
+ tags : ${{ steps.meta.outputs.tags }}
63
+ labels : ${{ steps.meta.outputs.labels }}
64
+
30
65
generate-job-matrix :
66
+ needs : build-runner-image
31
67
runs-on : ubuntu-latest
68
+ container : ${{ needs.build-runner-image.outputs.image }}
32
69
outputs :
33
70
matrix : ${{ steps.generate-matrix.outputs.matrix }}
34
71
steps :
48
85
pull-requests : write
49
86
name : Check - ${{ matrix.run_args.name }}
50
87
runs-on : ${{ matrix.run_args.os }}
51
- needs : generate-job-matrix
88
+ container : ${{ needs.build-runner-image.outputs.image }}
89
+ needs :
90
+ - generate-job-matrix
91
+ - build-runner-image
52
92
strategy :
53
93
matrix :
54
94
run_args : ${{fromJson(needs.generate-job-matrix.outputs.matrix)}}
0 commit comments