Forgejo action: build our in-house apps as RPMs for x86_64 and aarch64, and upload them to the forge RPM group.
Find a file
Philip Peterson b3c34b1592 app-build: build in-house apps as RPMs for x86_64 and aarch64
Moved out of each app's repo (layer-wizard, dnf-package-store,
swap-watchdog), which each had a copy of the same build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 21:04:39 -09:00
scripts app-build: build in-house apps as RPMs for x86_64 and aarch64 2026-11-03 21:04:39 -09:00
action.yml app-build: build in-house apps as RPMs for x86_64 and aarch64 2026-11-03 21:04:39 -09:00
README.md app-build: build in-house apps as RPMs for x86_64 and aarch64 2026-11-03 21:04:39 -09:00

app-build

A Forgejo action for our in-house apps (layer-wizard, dnf-package-store, swap-watchdog, …): on every push to an app's main,

  1. build it as an RPM for x86_64 and aarch64, packaged by the app's own packaging/<name>.spec, in a Fedora container per architecture (arm64 under runner-x86-linux's QEMU emulation);
  2. upload the RPMs to the forge's quine RPM group, https://forge.quinefoundation.com/api/packages/quine-global-labs/rpm/quine, which quine-linux's image installs them from.

The build itself lives here, so a fix (a new Flutter release, another architecture) lands in every app at once.

Using it

In the app's repo, .forgejo/workflows/rpm.yml:

name: RPM

on:
  push:
    branches: [main]
  workflow_dispatch:

concurrency:
  group: rpm-${{ github.ref }}
  cancel-in-progress: true

jobs:
  rpm:
    runs-on: runner-x86-linux
    steps:
      - uses: https://forge.quinefoundation.com/quine-global-labs/mirror-actions-checkout@v4
        with:
          fetch-depth: 0
      - uses: https://forge.quinefoundation.com/quine-global/app-build@v1
        with:
          name: swap-watchdog
          kind: go
          go-packages: ./cmd/swap-watchdog ./cmd/force-quit-gui
          dnf-packages: gtk3-devel
          registry-username: ${{ vars.REGISTRY_USER || github.actor }}
          registry-password: ${{ secrets.REGISTRY_TOKEN }}

fetch-depth: 0 isn't needed for the build, but the release number uses the commit's short hash.

Inputs (action.yml has them all):

Input
name Package name; the spec is packaging/<name>.spec
kind flutter or go
go-packages Go only: packages built into bin/
dnf-packages Extra Fedora packages for the build (e.g. gtk3-devel for cgo GTK)
archs Default amd64 arm64
fedora Default 44

What the spec gets

rpmbuild defines version_, release_ (<UTC timestamp>.git<hash>) and srcdir (the checkout). Specs install from what the build left there instead of building in %build:

  • go: the binaries in %{srcdir}/bin/; version 0.
  • flutter: %{bundle}, the release bundle (build/linux/<x64|arm64>/release/bundle); the version is pubspec.yaml's.

The spec needs ExclusiveArch: x86_64 aarch64 (or whatever archs builds).

Versions

@v1 follows compatible changes; a change that needs apps to change (an input renamed, the spec contract) gets v2.