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