From 70414d854dd360307360673217bf09423c547e04 Mon Sep 17 00:00:00 2001 From: LiHaohua Date: Wed, 6 May 2026 15:09:54 +0800 Subject: [PATCH 1/2] publish.yml: trigger on ci/** and split preview gh-pages branch So pushing to a ci/** branch fully exercises the pipeline (apt-ftparchive, GPG skip-path, index commit back, Pages publish) without polluting the production gh-pages branch: - push filter includes "ci/**" in addition to main - metadata commit pushes back to the source branch, not hard-coded main - gh-pages publish lands on gh-pages-preview when the source branch is anything other than main Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/publish.yml | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1d5e93e..d7f8b55 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -13,7 +13,9 @@ name: Publish apt index on: push: - branches: [main] + branches: + - main + - 'ci/**' # let bootstrap / preview branches exercise the pipeline paths: - 'incoming/**' - 'pool/**' @@ -169,7 +171,7 @@ jobs: - name: Clean pool/ before committing (we don't want .deb in git) run: rm -rf pool/main/*.deb - - name: Commit metadata back to main + - name: Commit metadata back to the source branch run: | set -euo pipefail git config user.name "cardputer-repo-bot" @@ -180,21 +182,30 @@ jobs: exit 0 fi git commit -m "ci: refresh apt index ($(date -u +%Y-%m-%dT%H:%M:%SZ))" - git push origin HEAD:main + # Push back to whichever branch triggered us (main or a ci/** preview). + git push origin HEAD:"${GITHUB_REF#refs/heads/}" - - name: Publish to gh-pages + - name: Publish to gh-pages (or gh-pages-preview on ci/** branches) run: | set -euo pipefail + # ci/** branches push to a preview branch so they never overwrite + # the production index. main writes straight to gh-pages. + case "${GITHUB_REF#refs/heads/}" in + main) pages_branch=gh-pages ;; + *) pages_branch=gh-pages-preview ;; + esac + echo "→ target branch: $pages_branch" + staging=$(mktemp -d) cp -r dists "$staging/" [ -f KEY.gpg ] && cp KEY.gpg "$staging/" cp README.md "$staging/index.md" cd "$staging" - git init -q -b gh-pages + git init -q -b "$pages_branch" git config user.name "cardputer-repo-bot" git config user.email "bot@users.noreply.github.com" git remote add origin "https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git" git add -A - git commit -q -m "publish apt index" - git push -qf origin gh-pages + git commit -q -m "publish apt index ($pages_branch)" + git push -qf origin "$pages_branch" From 05ac0eb812a508ecdf3fb3eff0329db0d6e429f6 Mon Sep 17 00:00:00 2001 From: cardputer-repo-bot Date: Wed, 6 May 2026 07:10:23 +0000 Subject: [PATCH 2/2] ci: refresh apt index (2026-05-06T07:10:23Z) --- dists/stable/Release | 23 +++++++++++++++++++++ dists/stable/main/binary-arm64/Packages | 14 +++++++++++++ dists/stable/main/binary-arm64/Packages.gz | Bin 0 -> 508 bytes incoming/czrepo-hello_0.1-1_arm64.deb | Bin 784 -> 0 bytes 4 files changed, 37 insertions(+) create mode 100644 dists/stable/Release create mode 100644 dists/stable/main/binary-arm64/Packages create mode 100644 dists/stable/main/binary-arm64/Packages.gz delete mode 100644 incoming/czrepo-hello_0.1-1_arm64.deb diff --git a/dists/stable/Release b/dists/stable/Release new file mode 100644 index 0000000..b54a444 --- /dev/null +++ b/dists/stable/Release @@ -0,0 +1,23 @@ +Architectures: arm64 +Codename: stable +Components: main +Date: Wed, 06 May 2026 07:10:23 +0000 +Label: CardputerZero +Origin: CardputerZero +Suite: stable +MD5Sum: + 4e2aa46ed33d6756058bf8b05fb1a898 150 Release + 7f68f295bcc2c4f1991bb802ee31e32f 688 main/binary-arm64/Packages + ba6b8981a576ebf97880e2e188f16e8a 508 main/binary-arm64/Packages.gz +SHA1: + a4d557e81d104df2b8dd1211969efde28ae32fcf 150 Release + 2082c8d1efc6ca14a4577ad683fae1225bb1c3d8 688 main/binary-arm64/Packages + ccb67757ca3cc30d42ca2f7dfb93dd49db849d41 508 main/binary-arm64/Packages.gz +SHA256: + bd21c7b914649ee5e2bd71e113517f701e074a941128837f40685b99eb886c10 150 Release + cbda207ebf7a61f7f8cb9d8821b2d642f6c0dee3ac3dedb0f11f8a548c8806c1 688 main/binary-arm64/Packages + 26f4db77260017a2f82a6b2ea54055ebee773e695cbc3c58c9614320c199dfa3 508 main/binary-arm64/Packages.gz +SHA512: + 0ee5e2859e93a8f6e968829c7be3069c17e9e90ad85c54242d04771b5d79aaac9677647669281f57142f39c249993e0f415ace66b8f1f86ba081aa01719ac224 150 Release + 00373c6151cf570529147e3ab8a75c68239c9957963cae624ef13618f36de1b90b1af8b73d94f03336bb242f3aa4d57f06d65bd023bc8cc4a0f0fdea2c1d9fd2 688 main/binary-arm64/Packages + c64016278c9229f742927411335d1c8d5effd53ad74ee73877280e92977d3b63984fa40886fba3281f594d2ea8e7feb29d49bb7ead93bf1ee79c9d9b12ba5f1f 508 main/binary-arm64/Packages.gz diff --git a/dists/stable/main/binary-arm64/Packages b/dists/stable/main/binary-arm64/Packages new file mode 100644 index 0000000..554c22e --- /dev/null +++ b/dists/stable/main/binary-arm64/Packages @@ -0,0 +1,14 @@ +Package: czrepo-hello +Architecture: arm64 +Version: 0.1-1 +Maintainer: CardputerZero Repository +Filename: releases/download/apt-pool/czrepo-hello_0.1-1_arm64.deb +Size: 784 +MD5sum: a4703c66a80bea45d9c45377ed6f235d +SHA1: c3e62927584e90fb0265fd1282ac86058b45a640 +SHA256: dd80f7e4437219469afde60ecb79c80532d19e7ff1746270d322410415efcef3 +SHA512: f847524840b716e56363774663da65cd349235d08e6537cc1a02bacfa1c0d8bc542a2b8399a879bd63f6cd3f58154a025f9a7ccb9461d931d0a57fbb6b31bb9c +Description: Bootstrap sentinel package used to validate publish.yml. + Ships a single file with a greeting; safe to dpkg -i on any arm64 host + because it only writes under /usr/share/czrepo-hello/. + diff --git a/dists/stable/main/binary-arm64/Packages.gz b/dists/stable/main/binary-arm64/Packages.gz new file mode 100644 index 0000000000000000000000000000000000000000..1d44647ba7ced2ef5a5378c7d3b1d67c378350c8 GIT binary patch literal 508 zcmVH28`15jaOYhh<)a{yJ6&2CdM5QX>mDf|LS{QnaWqEI0=l@OI! zu&KuOIM?dU^_A^VrB9F3ZeZb!XU>^#H0K9|XE@=Jgx88&+0D2tWxA_j&K*O))KP+Z z)^hrVwdJxN3Ei_Dn;syqeLSp3@)c^_E*J}viBujJ#+^YdA?KE~{q5@7i> zeaj23a301L7lelG5X;ND6o?1d`fe*_IsA+B^fvM74PzhCPmlR^sEw7=!@X*k^FWk_ zil8-E>Jg-hE=VPe!Kf1#Do&5z@7P#UpyrMnWhFYAJmp%Y$hhSYtftC(sX$A5Yv)QI zNsN{zgHj5^nUmT!xTrw(|!W1xxn~`GtNRpLCacL#> zhG|q<=z%A-77?@xQAl^=q!#ty4uJvX9zp^ZXtX{k$$@(-oC9l|k6I)>R7qK;3?Sx-S>8)4TNW-;{BQ9in4+6O~jHDOx2bLV6 zBiSx~$!*?W&&z%yk8|D{0n+k%T9Bl1OY)NYJibm9ad@3RkOm2F9&vjV^ literal 0 HcmV?d00001 diff --git a/incoming/czrepo-hello_0.1-1_arm64.deb b/incoming/czrepo-hello_0.1-1_arm64.deb deleted file mode 100644 index e2648aa1d26660ef61763c3e411cbabaca2b30ad..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 784 zcmY$iNi0gvu;WTeP0CEn(@o0EODw8XP*5;5H@7e_H83?cP*4COAb^mD1_ov(CJG8b z1O*9PMtTNZ$@zIDMfo{;C5c6P=~aaF8=D!y^~-m2Fn|D)@Y{>`y$&0QuziU8u6d4o zO>FG$Ln0sVuT|iRtC+s@xS3A&DbH6k{PVZnU9lj}S8$*F7ER9|m*z}f{w$mYnY7exNr@3LMRzUnFK%kYN>eXX`#TiUO4Z%3WuM+5x((Q)zrx4Q*Hh8Z)6)f z-;gg5J^iYAMWfAk#bc3DeEVG%KW}SVES~DSnCY^C-rA3`+hT9)ENwr>Gf$-Q^7d&j zZyvdRtVPdn>mixVw}L;tnprM+c0*QX(uuE2e!YFjb;VLXC~8yKM-3yzb+>eLRpPE* zzG1F2r9ZCdzUIR}wT+*2e8EA9O#HhieQ?oneg+K&hLpsTM0gYd!=F$r8yQ(*i=`_Y z^9~sZ94kCu%e9~3?Uo%g%zs{X9Ad2RLeeMp+j z5uFS3e~SNIyIAV)^w;(>QJv3ff9;+n@pt;W{np+#ORp+^t2NSp`(C>H@Bdr>wr@UV z|1