- sf-update (root): lists sf-shell / sf-app-* in the Gitea generic registry, downloads, checks the Ed25519 signature and unpacks to /var/lib/sf-pkg, switches via current/previous/staged symlinks; the factory copies on the read-only root stay as fallback. A new shell is on trial and rolls back after 3 failed starts. - Launcher: apps from factory + installed packages (newer version wins), Settings > System > Updates (check, install now), shell trial confirm. - Image: sf-update units (boot apply, 6-hourly download, launcher requests), sf-shell-exec wrapper for sf-remote, factory versions, registry token. - CI: .gitea/workflows/packages.yml builds, signs and uploads packages whose version isn't published yet (tools/pkg/packages.sh). - docs/updates.md: protocol and layout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
66 lines
2.2 KiB
YAML
66 lines
2.2 KiB
YAML
# Builds, signs and publishes the SmartFox packages (shell + apps) to the
|
|
# Gitea generic package registry. A package is only built when its version
|
|
# isn't published yet: bump the version to release (docs/updates.md).
|
|
#
|
|
# Runner hygiene (shared host, little disk): runs in the runner image that is
|
|
# already on the host (no image pull), uses no `uses:` actions (no action
|
|
# cache), and deletes everything it made at the end.
|
|
name: packages
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- "crates/**"
|
|
- "apps/**"
|
|
- "Cargo.toml"
|
|
- "Cargo.lock"
|
|
- "tools/pkg/**"
|
|
- "tools/siri-remote/fastpair.py"
|
|
- ".gitea/workflows/packages.yml"
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
packages:
|
|
runs-on: build
|
|
container:
|
|
image: docker.gitea.com/runner-images:ubuntu-latest
|
|
env:
|
|
CARGO_HOME: /tmp/sf-build/cargo
|
|
RUSTUP_HOME: /tmp/sf-build/rustup
|
|
CARGO_TARGET_DIR: /tmp/sf-build/target
|
|
CARGO_INCREMENTAL: "0"
|
|
SF_OUT: /tmp/sf-build/out
|
|
steps:
|
|
- name: Checkout
|
|
run: |
|
|
mkdir -p /tmp/sf-build
|
|
host="${GITHUB_SERVER_URL#https://}"
|
|
git clone --depth 1 --branch "${GITHUB_REF_NAME}" \
|
|
"https://oauth2:${{ secrets.GITHUB_TOKEN }}@${host}/${GITHUB_REPOSITORY}.git" /tmp/sf-build/src
|
|
|
|
- name: Toolchain
|
|
run: |
|
|
export DEBIAN_FRONTEND=noninteractive
|
|
apt-get update -qq
|
|
apt-get install -y -qq --no-install-recommends build-essential pkg-config zstd \
|
|
libfontconfig1-dev libfreetype-dev libxkbcommon-dev libdbus-1-dev libudev-dev >/dev/null
|
|
rm -rf /var/lib/apt/lists/*
|
|
curl -sSf https://sh.rustup.rs | sh -s -- -y -q --profile minimal --no-modify-path
|
|
/tmp/sf-build/cargo/bin/rustc --version
|
|
|
|
- name: Build, sign, upload
|
|
env:
|
|
SF_SIGNING_KEY: ${{ secrets.SF_SIGNING_KEY }}
|
|
SF_PACKAGE_TOKEN: ${{ secrets.SF_PACKAGE_TOKEN }}
|
|
run: |
|
|
export PATH="/tmp/sf-build/cargo/bin:$PATH"
|
|
cd /tmp/sf-build/src
|
|
bash tools/pkg/packages.sh --upload
|
|
|
|
- name: Clean up
|
|
if: always()
|
|
run: |
|
|
rm -rf /tmp/sf-build
|
|
df -h / | tail -1
|