From c64ef42a12d57b283d6dc4780b771cb793965b30 Mon Sep 17 00:00:00 2001 From: Eugene Blikh Date: Tue, 26 May 2026 00:01:36 +0300 Subject: [PATCH] Fix pages.sr.ht target: bigbes.pages.srht.bigb.es/ci-cacher MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit cacher.srht.bigb.es was a guess and isn't configured. Use the user-level pages domain (bigbes.pages.srht.bigb.es) with hut's `-s /ci-cacher` subpath flag so this manifest only touches files under that prefix — leaves room for other projects under the same domain without clobbering. --- .builds/publish.yml | 31 ++++++++++++++++++------------- README.md | 6 +++--- 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/.builds/publish.yml b/.builds/publish.yml index 023b1bde396582e01326d2e517bccd8e7cf61131..7c339d02d54daf5b89390b29c5ff8087e08017c5 100644 --- a/.builds/publish.yml +++ b/.builds/publish.yml @@ -3,11 +3,13 @@ # 1. Build artifact (cacher-linux-amd64 visible on the job page, # pruned by builds.sr.ht after 90 days). # -# 2. pages.sr.ht under cacher.srht.bigb.es so downstream projects -# can `wget https://cacher.srht.bigb.es/cacher-linux-amd64` with -# a stable URL. The latest tag overwrites the previous publish; -# historical versions remain available via the artifact link -# during the 90-day window. +# 2. pages.sr.ht under bigbes.pages.srht.bigb.es/ci-cacher/, so +# downstream projects can `wget` from a stable URL. We publish +# with `hut pages publish -s /ci-cacher` so this manifest only +# touches files under that subpath — other projects sharing the +# user-level pages domain stay intact. Latest tag overwrites the +# previous publish under /ci-cacher; historical versions remain +# available via the artifact link during the 90-day window. # # Auto-submission is restricted to tag refs only. image: ubuntu/noble @@ -21,7 +23,8 @@ environment: GO_VERSION: "1.26.3" PATH: /home/build/.local/go/bin:/home/build/.local/bin:/home/build/go/bin:/usr/local/bin:/usr/bin:/bin GOPATH: /home/build/go - PAGES_DOMAIN: cacher.srht.bigb.es + PAGES_DOMAIN: bigbes.pages.srht.bigb.es + PAGES_SUBPATH: /ci-cacher submitter: git.sr.ht: enabled: true @@ -50,24 +53,26 @@ tasks: /home/build/cacher-linux-amd64 version sha256sum /home/build/cacher-linux-amd64 - package_pages: | - # pages.sr.ht expects a tarball whose top-level contents become the - # site root — so `tar -C dist .`, not `tar dist/`. The binary lands - # at https://$PAGES_DOMAIN/cacher-linux-amd64. A minimal index.html - # makes the root URL informative instead of a 404. + # pages.sr.ht expects a tarball whose top-level contents map to the + # publish path — so `tar -C dist .`, not `tar dist/`. With + # `-s /ci-cacher` the binary lands at + # https://$PAGES_DOMAIN/ci-cacher/cacher-linux-amd64. A minimal + # index.html under /ci-cacher makes the project URL informative + # instead of a 404. VERSION=$(cd ci-cacher && (git describe --tags --abbrev=0 2>/dev/null || cat VERSION)) SUM=$(sha256sum /home/build/cacher-linux-amd64 | awk '{print $1}') mkdir -p /home/build/dist cp /home/build/cacher-linux-amd64 /home/build/dist/cacher-linux-amd64 cat > /home/build/dist/index.html <cacher + cacher $VERSION

cacher $VERSION

S3-backed CI cache helper. Source.

-
wget https://$PAGES_DOMAIN/cacher-linux-amd64
+      
wget https://$PAGES_DOMAIN$PAGES_SUBPATH/cacher-linux-amd64
       sha256sum cacher-linux-amd64  # expect: $SUM
EOF cd /home/build/dist tar -czvf /home/build/site.tar.gz . - publish_pages: | - hut pages publish -d "$PAGES_DOMAIN" /home/build/site.tar.gz + hut pages publish -d "$PAGES_DOMAIN" -s "$PAGES_SUBPATH" /home/build/site.tar.gz artifacts: - cacher-linux-amd64 diff --git a/README.md b/README.md index fb8f78206581785d6056f0c45136e0476558dbf9..3076df0e3898bce671e247c9be261f395026a79e 100644 --- a/README.md +++ b/README.md @@ -26,12 +26,12 @@ cacher download "$key" "$out" --url "$url" ```sh # Pre-built linux-amd64 binary (latest tag): -wget https://cacher.srht.bigb.es/cacher-linux-amd64 -O ~/.local/bin/cacher +wget https://bigbes.pages.srht.bigb.es/ci-cacher/cacher-linux-amd64 -O ~/.local/bin/cacher chmod +x ~/.local/bin/cacher # Pin to a specific build by sha256 (printed on the publish.yml job page): -wget https://cacher.srht.bigb.es/cacher-linux-amd64 -O ~/.local/bin/cacher -echo " /root/.local/bin/cacher" | sha256sum -c +wget https://bigbes.pages.srht.bigb.es/ci-cacher/cacher-linux-amd64 -O ~/.local/bin/cacher +echo " ~/.local/bin/cacher" | sha256sum -c # From source: go install go.bigb.es/cacher@latest