@@ -25,10 +25,10 @@ env: # Global environment, passed to all jobs & all steps
2525 CI_TAGS : " standard armbian-sbc armbian-uefi lts" # 'dev' is not included
2626
2727 # GHA runner configuration. See bash/json-matrix.sh for more details.
28- CI_RUNNER_LK_CONTAINERS_ARM64 : " oracle-24cpu-384gb -arm64" # Use a self-hosted runner with the "ARM64" tag for the ARM64 builds of LK containers
29- CI_RUNNER_LK_CONTAINERS_AMD64 : " oracle-24cpu-384gb -x86-64" # Use a self-hosted runner with the "X86" tag for the AMD64 builds of LK containers
30- CI_RUNNER_LK_ARM64 : " oracle-24cpu-384gb -arm64" # Use a self-hosted runner with the "ARM64" tag for the ARM64 linuxkit builds
31- CI_RUNNER_LK_AMD64 : " oracle-24cpu-384gb -x86-64" # Use a self-hosted runner with the "X86" tag for the AMD64 linuxkit builds
28+ CI_RUNNER_LK_CONTAINERS_ARM64 : " oracle-vm-32cpu-128gb -arm64" # Use a self-hosted runner with the "ARM64" tag for the ARM64 builds of LK containers
29+ CI_RUNNER_LK_CONTAINERS_AMD64 : " oracle-vm-32cpu-128gb -x86-64" # Use a self-hosted runner with the "X86" tag for the AMD64 builds of LK containers
30+ CI_RUNNER_LK_ARM64 : " oracle-vm-32cpu-128gb -arm64" # Use a self-hosted runner with the "ARM64" tag for the ARM64 linuxkit builds
31+ CI_RUNNER_LK_AMD64 : " oracle-vm-32cpu-128gb -x86-64" # Use a self-hosted runner with the "X86" tag for the AMD64 linuxkit builds
3232 CI_RUNNER_KERNEL_AMD64 : " oracle-24cpu-384gb-x86-64" # Use a self-hosted runner with the "X86" tag for the AMD64 kernel builds
3333 CI_RUNNER_KERNEL_ARM64 : " oracle-24cpu-384gb-arm64" # Use a self-hosted runner with the "ARM64" tag for the ARM64 kernel builds
3434
6060
6161 build-linuxkit-containers :
6262 needs : [ matrix_prep ]
63- runs-on : " ${{ matrix.runner }}" # the runner to use is determined by the 'gha-matrix' code
63+ runs-on :
64+ group : Default
65+ labels : " ${{ matrix.runner }}" # the runner to use is determined by the 'gha-matrix' code
6466 strategy :
6567 fail-fast : true
6668 matrix :
7577
7678 - name : Set up Docker Buildx
7779 uses : docker/setup-buildx-action@v3
80+ with :
81+ buildkitd-config-inline : |
82+ [registry."docker.io"]
83+ mirrors = ["mirror.gcr.io"]
7884
7985 - name : Docker Login to quay.io
8086 if : ${{ env.REGISTRY == 'quay.io' && github.ref == 'refs/heads/main' }}
@@ -86,15 +92,26 @@ jobs:
8692 uses : docker/login-action@v3
8793 with : { registry: "ghcr.io", username: "${{ github.repository_owner }}", password: "${{ secrets.GITHUB_TOKEN }}" }
8894
89- - name : Build and Push LinuxKit containers for ${{matrix.docker_arch}}
95+ - name : Build and Push and Export LinuxKit containers for ${{matrix.docker_arch}}
9096 env :
9197 DOCKER_ARCH : " ${{ matrix.docker_arch }}"
9298 DO_PUSH : " ${{ github.ref == 'refs/heads/main' && 'yes' || 'no' }}"
99+ EXPORT_LK_CONTAINERS : " yes"
100+ EXPORT_LK_CONTAINERS_DIR : " ${{ runner.temp }}"
93101 run : bash build.sh linuxkit-containers
94-
102+
103+ - name : Upload Linuxkit Docker images as GitHub Artifacts
104+ uses : actions/upload-artifact@v4
105+ with :
106+ name : linuxkit-images-${{ matrix.docker_arch }}
107+ path : ${{ runner.temp }}/*-${{ matrix.docker_arch }}.tar.gz
108+ retention-days : 1
109+
95110 build-kernels :
96111 needs : [ matrix_prep ] # depend on the previous job...
97- runs-on : " ${{ matrix.runner }}" # the runner to use is determined by the 'gha-matrix' code
112+ runs-on :
113+ group : Default
114+ labels : " ${{ matrix.runner }}" # the runner to use is determined by the 'gha-matrix' code
98115 strategy :
99116 fail-fast : false # let other jobs try to complete if one fails, kernels might take long, and they'd be skipped on the next run
100117 matrix :
@@ -106,6 +123,10 @@ jobs:
106123
107124 - name : Set up Docker Buildx # nb: no need for qemu here, kernels are cross-compiled, instead of the compilation being emulated
108125 uses : docker/setup-buildx-action@v3
126+ with :
127+ buildkitd-config-inline : |
128+ [registry."docker.io"]
129+ mirrors = ["mirror.gcr.io"]
109130
110131 - name : Docker Login to quay.io
111132 if : ${{ env.REGISTRY == 'quay.io' && github.ref == 'refs/heads/main' }}
@@ -120,11 +141,22 @@ jobs:
120141 - name : Build and push Kernel ${{matrix.kernel}} (${{ matrix.arch }})
121142 env :
122143 DO_PUSH : " ${{ github.ref == 'refs/heads/main' && 'yes' || 'no' }}"
144+ EXPORT_KERNEL_IMAGE : " yes"
145+ EXPORT_KERNEL_IMAGE_DIR : " ${{ runner.temp }}"
123146 run : bash build.sh build-kernel "${{ matrix.kernel }}"
124147
148+ - name : Upload Kernel Docker images as GitHub Artifacts
149+ uses : actions/upload-artifact@v4
150+ with :
151+ name : kernel-images-${{ matrix.kernel }}
152+ path : ${{ runner.temp }}/hook-kernel-*.tar.gz
153+ retention-days : 1
154+
125155 build-hook-ensemble :
126156 needs : [ matrix_prep, build-linuxkit-containers, build-kernels ] # depend on the previous job...
127- runs-on : " ${{ matrix.runner }}" # the runner to use is determined by the 'gha-matrix' code
157+ runs-on :
158+ group : Default
159+ labels : " ${{ matrix.runner }}" # the runner to use is determined by the 'gha-matrix' code
128160 strategy :
129161 fail-fast : false # let other jobs try to complete if one fails
130162 matrix :
@@ -136,6 +168,10 @@ jobs:
136168
137169 - name : Set up Docker Buildx # nb: no need for qemu here, kernels are cross-compiled, instead of the compilation being emulated
138170 uses : docker/setup-buildx-action@v3
171+ with :
172+ buildkitd-config-inline : |
173+ [registry."docker.io"]
174+ mirrors = ["mirror.gcr.io"]
139175
140176 - name : Docker Login to DockerHub # read-only token, required to be able to pull all the linuxkit pkgs without getting rate limited.
141177 if : ${{ env.LOGIN_TO_DOCKERHUB == 'yes' && github.ref == 'refs/heads/main' }}
@@ -163,6 +199,42 @@ jobs:
163199 lk-cache-${{ matrix.docker_arch }}
164200 save-always : true # always save the cache, even if build fails
165201
202+ - name : Download Linuxkit artifacts
203+ uses : actions/download-artifact@v4
204+ with :
205+ name : linuxkit-images-${{ matrix.docker_arch }}
206+ path : ${{ runner.temp }}
207+
208+ - name : Load Linuxkit Docker images into local Docker daemon
209+ run : |
210+ ls "${{ runner.temp }}"
211+ imgs=$(ls "${{ runner.temp }}" | grep tar.gz | xargs)
212+ echo "Found hook images: ${imgs}"
213+ for img in ${imgs}; do
214+ echo "extracting and loading image: ${{ runner.temp }}/${img}"
215+ gunzip -d "${{ runner.temp }}/${img}"
216+ docker load --input "${{ runner.temp }}/${img%.*}"
217+ done
218+ docker images
219+
220+ - name : Download Kernel artifacts
221+ uses : actions/download-artifact@v4
222+ with :
223+ name : kernel-images-${{ matrix.kernel }}
224+ path : ${{ runner.temp }}
225+
226+ - name : Load Kernel Docker images into local Docker daemon
227+ run : |
228+ ls "${{ runner.temp }}"
229+ imgs=$(ls "${{ runner.temp }}" | grep tar.gz | xargs)
230+ echo "Found kernel images: ${{ runner.temp }}/${imgs}"
231+ for img in ${imgs}; do
232+ echo "extracting and loading image: ${{ runner.temp }}/${img}"
233+ gunzip -d "${{ runner.temp }}/${img}"
234+ docker load --input "${{ runner.temp }}/${img%.*}"
235+ done
236+ docker images
237+
166238 - name : " Build Hook with Kernel ${{matrix.kernel}} (${{ matrix.arch }}) - cache: ${{matrix.gha_cache}}"
167239 env :
168240 DO_BUILD_LK_CONTAINERS : " no" # already built them; this is only for hook/linuxkit.
@@ -181,6 +253,7 @@ jobs:
181253 path : |
182254 out/*.tar.gz
183255 out/*.iso
256+ retention-days : 1
184257
185258 release-latest :
186259 name : Publish all Hooks to GitHub Releases
0 commit comments