Put everything that publishes behind a PUBLISH repo variable

So the pipeline can be run end to end as a dry run before it is trusted with
the tarball host, state.json and the AUR.

Claude-Session: https://claude.ai/code/session_01GGe7kUhooMFuzY6GaDb2w9
This commit is contained in:
agw
2026-09-30 21:05:00 +02:00
parent 5f28b2e2bb
commit 3c3980278a
2 changed files with 10 additions and 0 deletions
+9
View File
@@ -23,6 +23,10 @@ concurrency:
group: jasp-build
cancel-in-progress: false
# Nothing leaves the runner unless the repo variable PUBLISH is 'true'. Without
# it a run builds, verifies and generates the PKGBUILD, and leaves the tarball
# in ${WORK_DIR}/out for inspection: a dry run that cannot touch the tarball
# host, state.json or the AUR.
env:
AUR_MAINTAINER: ${{ vars.AUR_MAINTAINER }}
TARBALL_HOST: ${{ vars.TARBALL_HOST }}
@@ -114,6 +118,7 @@ jobs:
# file, so publishing the package before the tarball exists would leave
# users with a 404.
- name: Publish tarball to asger.weirsoe.dk
if: vars.PUBLISH == 'true'
env:
TARBALL_SSH_KEY: ${{ secrets.TARBALL_SSH_KEY }}
run: |
@@ -121,6 +126,7 @@ jobs:
bash scripts/publish-tarball.sh "${WORK_DIR}/out/${ASSET}"
- name: Verify the published URL actually serves the tarball
if: vars.PUBLISH == 'true'
run: |
URL="$(python3 -c 'import json;print(json.load(open("release-meta.json"))["download_url"])')"
WANT="$(python3 -c 'import json;print(json.load(open("release-meta.json"))["sha256"])')"
@@ -137,6 +143,7 @@ jobs:
# Only the PKGBUILD and metadata cross the job boundary — the tarball
# itself already lives on GitHub Releases.
- name: Hand PKGBUILD to the AUR job
if: vars.PUBLISH == 'true'
uses: actions/upload-artifact@v3
with:
name: aur-package
@@ -145,6 +152,7 @@ jobs:
release-meta.json
- name: Record built state
if: vars.PUBLISH == 'true'
env:
STATE_PUSH_TOKEN: ${{ secrets.STATE_PUSH_TOKEN }}
run: bash scripts/record-state.sh
@@ -157,6 +165,7 @@ jobs:
aur:
needs: [check, build]
if: vars.PUBLISH == 'true'
runs-on: ubuntu-latest
container:
image: archlinux:base-devel
+1
View File
@@ -99,6 +99,7 @@ Set these in the Gitea repo before the first run.
| `TARBALL_HOST` | `192.168.10.148` | CT148, where tarballs are uploaded |
| `TARBALL_PATH` | `/srv/tarballz` | Directory on that host |
| `TARBALL_BASE_URL` | `https://asger.weirsoe.dk/tarballz` | Public URL the PKGBUILD downloads from |
| `PUBLISH` | `true` | Master switch. Unless it is `true`, a run only builds and verifies, leaving the tarball in `/srv/jasp-build/out`: no upload, no `state.json` commit, no AUR push. |
**Secrets** (Settings → Actions → Secrets):