Commit graph

5 commits

Author SHA1 Message Date
36fe1c1e8a ci(upstream-sync): allow incomplete LFS push
git-lfs's pre-push hook rejects pushes that reference LFS objects the
local checkout doesn't have. Since we skipped smudge on checkout
(GIT_LFS_SKIP_SMUDGE=1), no LFS content is local. But we're only
pushing branch pointers — no new LFS bytes to upload. Tell lfs to
allow the incomplete push via 'git config lfs.allowincompletepush
true', per the hint the hook itself prints.
2026-04-17 11:36:59 -07:00
5f7613ddac ci(upstream-sync): use write-scoped PAT for push; make notify best-effort
Run 90 hit two problems in sequence:

1. Built-in $GITEA_TOKEN is read-only by default in Gitea Actions, so
   'git push origin main' 404'd ('failed to push some refs'). Swapped
   to a new GIT_PUSH_TOKEN repo secret (admin-scoped PAT) which the
   checkout action uses when wiring the authenticated remote.

2. None of our bot accounts are currently in the Infra Matrix room, so
   the notification POST would 403 and fail the whole run. Made that
   step continue-on-error — the sync is the critical path; a missed
   ping is recoverable (check Actions UI, invite a bot later, etc).
2026-04-17 11:35:29 -07:00
e710e7d669 ci(upstream-sync): skip LFS smudge to unblock fetch step
The repo's .gitattributes (inherited from upstream) routes certain paths
through git-lfs. Gitea's LFS store doesn't hold those blobs, so on
checkout the smudge filter tries to download them, 404s, and leaves git
in a state where subsequent 'git fetch' calls appear to succeed but
don't actually populate refs.

Run 89 was bitten by this: checkout 'succeeded' with an LFS smudge
fatal, then 'git fetch upstream develop' ran silently, 'git merge
--ff-only upstream/develop' failed because upstream/develop ref
didn't exist locally, and the workflow logged a misleading warning
blaming a divergence that wasn't there.

Setting GIT_LFS_SKIP_SMUDGE=1 keeps LFS pointers as-is. We don't need
image bytes to ff-merge and diff refs.
2026-04-17 11:31:48 -07:00
d25549fcc9 ci(upstream-sync): fetch from GitHub directly, skip the mirror layer
The Gitea pull-mirror of element-hq/element-x-android is slow to
populate its initial clone (~12 GB). Rather than block workflow
verification on the mirror landing, fetch straight from GitHub — the
runner has outbound access and GitHub isn't flaky. The mirror stays in
place as a fallback / LAN-cache for humans doing manual git fetches.
2026-04-17 11:06:57 -07:00
b61ebd2f11 ci: upstream-sync workflow; retire upstream's GitHub-specific workflows
Daily cron at 12:00 UTC (plus manual dispatch) that:
  1. Fetches from the Sulkta-Coop/element-x-upstream pull-mirror
  2. Fast-forwards main to upstream/develop if it has advanced
  3. Measures how many commits behind main the wallet branch is now
  4. Posts a ping to the Infra Matrix room so we know a rebase is due

Uses the house-bot (Matrix) account for notifications; token lives in
the repo's MATRIX_HOUSE_BOT_TOKEN Actions secret.

Removed .github/workflows/* — upstream's 18 workflows are GitHub-specific
(GITHUB_TOKEN scopes, Firebase / Sonar / Sentry / Localazy secrets we
don't have, macOS runners, etc). They were triggering on every push and
failing immediately, flooding the runner log. We're not proposing these
back upstream — we're a fork that doesn't publish to Play/F-Droid, so
their CI isn't ours to run.

If we ever need to see upstream's workflow definitions for reference,
they're one click away on github.com/element-hq/element-x-android.
2026-04-17 10:49:26 -07:00