You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ci(board-snapshot): mirror the archive to Cloudflare R2 after the branch push
The archive branch survives an account suspension but not an action against
the repository itself. Add one step after the archive commit that mirrors the
archive checkout to an R2 prefix with --delete, and writes one tarball per UTC
day outside that prefix, since R2 has no bucket versioning and a --delete sync
keeps no history.
Until the four repository secrets exist the step prints one notice and exits 0;
a configured upload that fails goes red. pull_request runs never upload, the
same guard the archive commit already carries.
Claude-Session: https://claude.ai/code/session_01DAcomhvR9kKizeYgg89Vo8
Co-authored-by: Claude <noreply@anthropic.com>
echo "status=skipped — no R2 credentials configured in this repository" >> "$GITHUB_OUTPUT"
335
+
echo "::notice::R2 upload skipped: R2_ACCOUNT_ID, R2_BUCKET, R2_ACCESS_KEY_ID and R2_SECRET_ACCESS_KEY are not all set as repository secrets; this run is archived on the board-archive branch only."
echo "::error::aws s3 sync to R2 exited $code. This run IS archived on board-archive; the out-of-GitHub copy is now behind and every later run will stay behind until this is fixed."
357
+
exit 1
358
+
fi
359
+
# One line per object moved. The first configured run moves the whole
360
+
# board and every later run moves a handful, so the log is truncated
361
+
# here and the counts below are taken over all of it.
362
+
transfers=$(wc -l < "$RUNNER_TEMP/r2-sync.log")
363
+
head -n 50 "$RUNNER_TEMP/r2-sync.log"
364
+
if [ "$transfers" -gt 50 ]; then
365
+
echo "... and $((transfers - 50)) further transfer line(s), not printed."
0 commit comments