From 2be9e4e82716f6d36b0d2d0615a87ac68cdf5246 Mon Sep 17 00:00:00 2001 From: X9 Dev Date: Tue, 21 Apr 2026 09:59:47 +0200 Subject: [PATCH] ci: update deploy.json on web after each release via docker exec Adds docker-cli to build container (docker socket passed through by runner) and writes sha + timestamp to xetup-web container after successful release. Co-Authored-By: Claude Sonnet 4.6 --- .forgejo/workflows/release.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.forgejo/workflows/release.yml b/.forgejo/workflows/release.yml index cd7ae4d..f88e09b 100644 --- a/.forgejo/workflows/release.yml +++ b/.forgejo/workflows/release.yml @@ -26,7 +26,7 @@ jobs: - name: Setup working-directory: / run: | - apk add --no-cache git curl jq mingw-w64-gcc + apk add --no-cache git curl jq mingw-w64-gcc docker-cli git clone --depth=1 \ "http://x9:${{ secrets.FORGEJO_TOKEN }}@xetup-forgejo:3000/${{ github.repository }}.git" \ /repo @@ -80,3 +80,11 @@ jobs: --data-binary @xetup.exe echo "Released xetup.exe (commit ${SHORT})" + + - name: Update deploy.json + run: | + SHORT=$(echo "${{ github.sha }}" | cut -c1-7) + TS=$(date -u +%Y-%m-%dT%H:%M:%SZ) + docker exec xetup-web sh -c \ + "echo '{\"sha\":\"${SHORT}\",\"ts\":\"${TS}\"}' > /usr/share/nginx/html/data/deploy.json" + echo "deploy.json updated: ${SHORT} at ${TS}"