Shared apt-repo (reprepro) publish pipeline, reused by every DBinvent apt-repo
project (yaxaha_dist and future ones). One GitHub reusable workflow +
composite action here; each project keeps only its own build steps and repo
config.
scripts/publish-apt.sh— generic publish logic: gpg-sign a.deb,reprepro includedebit into a repo dir, copy ininstall.htmlas the index page. Callable standalone (env-var driven), used both locally and from CI.actions/publish-deb/— composite action wrapping the script above..github/workflows/publish-apt.yml— reusable workflow (workflow_call): checks out the caller repo, runs the caller's build step, then callspublish-deb.
The calling repo needs to provide:
build.shat its root — does whatever project-specific build (cargo, npm, whatever) produces a.deb, and writes the result asdeb=<absolute path>to$GITHUB_OUTPUT(works locally too if you setGITHUB_OUTPUTto point at a temp file before calling it).repo-conf/distributions— reprepro distribution config for this project (its ownCodename/Origin/SignWith).install.html— the page served as the repo'sindex.html.- A GPG key dedicated to that project/org — keep signing keys separate per org; don't reuse one key across projects.
- A caller workflow, e.g.
.github/workflows/build.yml:
name: Build <project>
on:
workflow_dispatch:
push:
concurrency:
group: deploy
cancel-in-progress: true
jobs:
build:
uses: DBinvent/infra_apt/.github/workflows/publish-apt.yml@v1
with:
project: <project>
package: <reprepro codename, matches repo-conf/distributions>
repo_dir: /media/lab/repo-<project>
build_script: ./build.sh /media/lab/vk-home/git
cleanup_docker: true
secrets:
gpg_key: ${{ secrets.GPG_KEY }}Give each project its own repo_dir (own reprepro conf/pool/dists) —
the publish script overwrites REPO_DIR/conf/distributions wholesale, so
projects can't safely share one repo root.
Callers should pin to a tag (currently @v1), not @main — bump the tag
deliberately when this pipeline changes so an edit here doesn't
simultaneously affect every project at once.
See yaxaha_dist for a working reference implementation.