Files
yocto_rpi/.gitea/actions/setup-kas/action.yml
T
druppy 16d63d95cb
Build RPi image / build (pull_request) Failing after 8s
Build RPi image / build (push) Failing after 9s
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

35 lines
1.0 KiB
YAML

name: setup-kas
description: Create or reuse the persistent python venv that holds kas.
inputs:
requirement:
description: pip requirement for kas (pinned, e.g. kas==5.5)
required: false
default: kas
outputs:
kas:
description: Absolute path of the kas executable
value: ${{ steps.venv.outputs.kas }}
reused:
description: "true when the venv already existed (warm run)"
value: ${{ steps.venv.outputs.reused }}
runs:
using: composite
steps:
- name: Prepare venv
id: venv
shell: bash
run: |
set -euo pipefail
BUILD_ROOT="${YOCTO_HOME:-$HOME/yocto-build}"
VENV="$BUILD_ROOT/venv"
mkdir -p "$BUILD_ROOT"
if [ -d "$VENV" ]; then
echo "reused=true" >> "$GITHUB_OUTPUT"
else
echo "reused=false" >> "$GITHUB_OUTPUT"
python3 -m venv "$VENV"
fi
"$VENV/bin/pip" install --quiet --upgrade "${{ inputs.requirement }}"
echo "kas=$VENV/bin/kas" >> "$GITHUB_OUTPUT"
echo "kas $($VENV/bin/kas --version) in $VENV"