From 45766b31d1fea89b6229f003370008b994639fb9 Mon Sep 17 00:00:00 2001 From: teahubxyz Date: Wed, 21 Oct 2026 03:41:06 +0000 Subject: [PATCH] shots workflow: stamp sw.js with the commit and commit it along with the shots Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01K6897PWcUEwHiqZMcVnNF6 --- .gitea/workflows/shots.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/shots.yml b/.gitea/workflows/shots.yml index 2fccb31..c8321ad 100644 --- a/.gitea/workflows/shots.yml +++ b/.gitea/workflows/shots.yml @@ -6,7 +6,7 @@ on: workflow_dispatch: push: branches: [main] - paths: [index.html, brain.js, favicon.svg, icons/icon.svg, tools/shots.sh, tools/icons.py] + paths: [index.html, brain.js, favicon.svg, manifest.json, icons/icon.svg, tools/shots.sh, tools/icons.py] permissions: contents: write concurrency: @@ -37,12 +37,14 @@ jobs: env: CHROME_FLAGS: "--no-sandbox --disable-dev-shm-usage --disable-gpu" run: sh tools/shots.sh + - name: stamp the service worker + run: sed -i "s/^const REV = \".*\";/const REV = \"${GITHUB_SHA::12}\";/" sw.js && grep '^const REV' sw.js - name: commit run: | set -eu - git add shots/desktop.png icons/icon-512.png icons/icon-192.png icons/apple-touch-icon.png + git add shots/desktop.png icons/icon-512.png icons/icon-192.png icons/apple-touch-icon.png sw.js if git diff --cached --quiet; then echo "shots unchanged"; exit 0; fi - git -c user.name='gitea-actions[bot]' -c user.email='gitea-actions[bot]@users.noreply.teahub.xyz' commit -q -m "shots: desktop.png + icons" + git -c user.name='gitea-actions[bot]' -c user.email='gitea-actions[bot]@users.noreply.teahub.xyz' commit -q -m "shots + sw stamp ${GITHUB_SHA::12}" git push -q origin HEAD:main - name: tell Teahub pages to pull run: curl -fsS -X POST "https://gandora.yolopreneur.lol/_hook/gandora/site" || echo "pages pulls by itself within five minutes"