Skip to content

Add gh actions workflow for building rpi image #5

Add gh actions workflow for building rpi image

Add gh actions workflow for building rpi image #5

Workflow file for this run

name: Build Raspberry Pi Image
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
# - arch: "32-bit"
# pi_gen_version: "master"
- arch: "64-bit"
pi_gen_version: "arm64"
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 21
cache: 'npm'
- name: Install modules
run: npm i
- name: Build app
run: npm run build
- name: Set Up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Build Custom Raspberry Pi Image
uses: usimd/pi-gen-action@v1
with:
# image-name: 'CustomPiImage'
# stage-list: 'stage0 stage1 stage2 stage-custom'
# config: './pi-gen-config/config'
# custom-stages: './pi-gen-config/stage-custom'
# export-last-stage-only: true
# increase-runner-disk-size: true
image-name: "rpideploy-${{ github.ref_name }}-${{ matrix.arch }}"
enable-ssh: 1
stage-list: stage0 stage1 stage2
# stage-list: stage0 stage1 stage2 ./stage-custom
verbose-output: true
pi-gen-version: ${{ matrix.pi_gen_version }}
# pi-gen-repository: RaspAP/pi-gen
- name: Upload Image Artifact
uses: actions/upload-artifact@v4
with:
name: custom-raspberry-pi-image
path: deploy/CustomPiImage.img