Skip to content

Build wlan(pi-gen) bookworm image #6

Build wlan(pi-gen) bookworm image

Build wlan(pi-gen) bookworm image #6

Workflow file for this run

name: Build wlan(pi-gen) bookworm image
on:
workflow_dispatch:
inputs:
repos:
descriptions: Repos to include
required: true
type: choice
options:
- both
- main
default: both
jobs:
build-prep:
runs-on: ubuntu-24.04-arm
steps:
- name: Check if inputs choice exists
run: |
CHOICE=${{ github.events.inputs.repos }}
if [ -z "$CHOICE" ]; then
echo "Error: inputs choice not found"
exit 1
fi
echo "REPOS=${{ github.events.inputs.repos }}" >> $GITHUB_ENV
- name: Set repos choice variable
run: |
echo "Repos choice: $REPOS"
if [ "$REPOS" = "both" ]; then
echo 'INCLUDE_PACKAGECLOUD_DEV=1' >> $GITHUB_OUTPUT
else
echo 'INCLUDE_PACKAGECLOUD_DEV=0' >> $GITHUB_OUTPUT
fi
build-image:
runs-on: ubuntu-24.04-arm
needs:
- build-prep
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
git \
coreutils \
quilt \
parted \
qemu-user-static \
debootstrap \
zerofree \
zip \
dosfstools \
libarchive-tools \
libcap2-bin \
rsync \
grep \
xz-utils \
file \
curl \
cpio \
python3 \
python3-pip \
jq \
binfmt-support \
systemd-container \
arch-test
- name: Grant Execution Permissions
run: chmod +x build.sh
- name: Run Build Script as Root
env:
GITHUB_REF_NAME: ${{ github.ref_name }}
run: |
sudo ./build.sh
- name: Get current date
id: date
run: echo "date=$(date -u +'%Y%m%dt%H%M%S')" >> $GITHUB_ENV
- name: Archive and Upload Build Artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: wlanpi-os~gha${{ env.date }}
path: deploy/
slack-workflow-status:
if: ${{ always() && (github.repository_owner == 'WLAN-Pi') && (! github.event.pull_request.head.repo.fork) }}
name: Post Workflow Status to Slack
needs:
- build-image
runs-on: 'ubuntu-22.04'
steps:
- name: Slack Workflow Notification
uses: Gamesight/slack-workflow-status@master
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }}