add action to build image

This commit is contained in:
ading2210 2024-01-25 22:13:19 +00:00
parent 922eccba42
commit 91f719d812
2 changed files with 45 additions and 2 deletions

43
.github/workflows/build-image.yaml vendored Normal file
View File

@ -0,0 +1,43 @@
name: build-image
run-name: Build the shimboot disk image for all boards
on: [push]
jobs:
main:
strategy:
matrix:
board: [dedede, octopus]
runs-on: ubuntu-latest
steps:
- name: wait for rootfs build to finish
uses: lewagon/wait-on-check-action@v1.3.3
with:
ref: ${{ github.ref }}
running-workflow-name: build-rootfs
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 10
- name: download repo
uses: actions/checkout@v4
- name: download rootfs
uses: actions/download-artifact@v4
with:
name: rootfs_tar
path: data/rootfs.tar.gz
- name: extract rootfs
run: |
sudo mkdir -p data/rootfs
sudo tar -xvf data/rootfs.tar.gz -C data/rootfs
- name: run build
run: sudo DEBUG=1 ./build_complete.sh ${{ matrix.board }} compress_img=1 rootfs_dir=./data/rootfs
- name: upload img
uses: actions/upload-artifact@v4
with:
name: shimboot_${{ matrix.board }}
path: data/shimboot_${{ matrix.board }}.zip
compression-level: 0

View File

@ -19,7 +19,6 @@ jobs:
sudo apt-get install debootstrap coreutils -y sudo apt-get install debootstrap coreutils -y
- name: run build - name: run build
id: run_build
run: sudo DEBUG=1 ./build_rootfs.sh data/rootfs bookworm hostname=shimboot root_passwd=root username=user user_passwd=user run: sudo DEBUG=1 ./build_rootfs.sh data/rootfs bookworm hostname=shimboot root_passwd=root username=user user_passwd=user
- name: archive rootfs - name: archive rootfs
@ -29,4 +28,5 @@ jobs:
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: rootfs_tar name: rootfs_tar
path: data/rootfs.tar.gz path: data/rootfs.tar.gz
compression-level: 0