Skip to content

Commit

Permalink
Added a GitHub Action to generate all needed Buildroot images.
Browse files Browse the repository at this point in the history
Signed-off-by: RICCIARDI-Adrien <adrien.ricciardi@hotmail.fr>
  • Loading branch information
RICCIARDI-Adrien committed Nov 25, 2023
1 parent 6b85b5b commit 0b1b2ab
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/generate_images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
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]
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 }}

0 comments on commit 0b1b2ab

Please sign in to comment.