-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (45 loc) · 1.51 KB
/
generate_images.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Generate prebuilt images
on: [push, pull_request]
jobs:
buildroot:
name: Build
runs-on: ubuntu-22.04
strategy:
matrix:
defconfig_name:
- qemu_x86_defconfig
- qemu_x86_64_defconfig
- raspberrypi4_defconfig
- raspberrypi4_64_defconfig
- qemu_ppc64le_pseries_defconfig
- qemu_mips32r2_malta_defconfig
- qemu_mips64_malta_defconfig
- qemu_riscv32_virt_defconfig
- qemu_riscv64_virt_defconfig
libc_name:
- glibc
- uclibc
- musl
env:
BUILDROOT_DIRECTORY_NAME: /home/runner/buildroot-${{ matrix.defconfig_name }}-${{ matrix.libc_name }}
permissions:
contents: write
steps:
- name: Retrieve CI scripts
uses: actions/checkout@v4
- name: Run build script
run: |
bash -x ${{ github.workspace }}/build-image.sh ${{ matrix.defconfig_name }} ${{ matrix.libc_name }} /home/runner
- name: Archive image
run: |
tar -c ${{ env.BUILDROOT_DIRECTORY_NAME }} -f ${{ env.BUILDROOT_DIRECTORY_NAME }}.tar
- name: Compress image
run: |
zstd -T0 -19 --rm -v ${{ env.BUILDROOT_DIRECTORY_NAME }}.tar
- name: Deploy image to repository release
if: startsWith(github.ref, 'refs/tags')
uses: softprops/action-gh-release@v1
with:
files: ${{ env.BUILDROOT_DIRECTORY_NAME }}.tar.zst
name: ${{ github.ref_name }}
tag_name: ${{ github.ref_name }}