Files
yocto_rpi/.gitea/workflows/build.yaml
druppy 16d63d95cb
Build RPi image / build (push) Failing after 9s
Build RPi image / build (pull_request) Failing after 8s
Refactor CI into composite actions + repo variables
The workflow was mostly inline bash. Moves the logic into reusable
composite actions under .gitea/actions/, keeps host paths in the
YOCTO_HOME repo variable, adds a workflow_dispatch skip-build option
and publishes step outputs (build dir, image list, kas path).
2026-10-24 19:39:31 +02:00

77 lines
2.0 KiB
YAML

name: Build RPi image
# Yocto (kas) build of rpilinux-image. Steps live in .gitea/actions/* so this
# file stays a description of the pipeline, not a shell script.
#
# Host-specific paths come from repo settings (Settings -> Actions ->
# Variables), so the workflow is not tied to one machine:
# YOCTO_HOME persistent build dir on the runner
# Order of precedence for the build dir: this variable, then the runner's
# own YOCTO_HOME (runner.envs), then $HOME/yocto-build.
on:
push:
# main is release protected, ci/* branches are free scratch space
branches: [main, 'ci/*']
pull_request:
# gates merges into main and posts the commit status that branch
# protection waits for
branches: [main]
workflow_dispatch:
inputs:
skip-build:
description: Collect images from the existing build dir instead of rebuilding
type: boolean
default: false
concurrency:
group: yocto-rpi-build
cancel-in-progress: false
permissions:
contents: read
env:
YOCTO_HOME: ${{ vars.YOCTO_HOME }}
MACHINE: raspberrypi4-64
IMAGE_PREFIX: rpilinux-image
defaults:
run:
shell: bash
jobs:
build:
runs-on: yocto
timeout-minutes: 600
steps:
- name: Check out sources
uses: builtin:checkout
- name: Verify build host
uses: $/.gitea/actions/check-build-host
with:
tools: git python3 curl wget rsync gawk xz diffstat chrpath bison flex node
min-disk-gb: "200"
- name: Set up kas
id: kas
uses: $/.gitea/actions/setup-kas
with:
requirement: kas==5.5
- name: Build image
id: image
uses: $/.gitea/actions/build-image
with:
machine: ${{ env.MACHINE }}
image-prefix: ${{ env.IMAGE_PREFIX }}
skip-build: ${{ github.event.inputs.skip-build }}
- name: Upload image
uses: actions/upload-artifact@v4
with:
name: ${{ env.IMAGE_PREFIX }}-${{ env.MACHINE }}
path: dist/
retention-days: 14