Watch
1
0
Fork
You've already forked souveraine
0

ci: one branch. primary builds and ships; public and the dead codeberg mirror are gone

This commit is contained in:
Fimeg 2026-07-31 14:36:46 -04:00
commit b5fc48eef1

View file

@ -1,15 +1,18 @@
name: ci
# CI for souveraine — Rust crate. Tests + clippy on push/PR to primary (dev)
# and public (published). On push to public, mirror public:public to Codeberg
# on green. primary stays the private dev branch; public is what publishes.
# CI for souveraine — Rust crate. Tests + clippy, then the aarch64 artifact,
# all on `primary`.
#
# Required repo secrets:
# CODEBERG_TOKEN — push to codeberg.org/Fimeg/Souveraine (public branch)
# There used to be a second branch, `public`, which was the only ref that
# published, so a green run on `primary` meant the gates passed and NOTHING
# SHIPPED — indistinguishable from a run that did. It existed to mirror to
# Codeberg; the mirror never worked and nothing else consumed it. Unified
# 2026-07-31 after it stranded three commits, including TASK-48's fix. One
# branch, one meaning: green on primary means it built and it shipped.
on:
push:
branches: [primary, public]
branches: [primary]
pull_request:
branches: [primary, public]
branches: [primary]
jobs:
rust-test:
@ -96,7 +99,7 @@ jobs:
aarch64-artifact:
runs-on: archdev
needs: [rust-test, no-ai-attribution, action-pins]
if: github.event_name == 'push' && github.ref == 'refs/heads/public'
if: github.event_name == 'push' && github.ref == 'refs/heads/primary'
steps:
- name: Clone repo + pinned tuie
run: |
@ -430,22 +433,3 @@ jobs:
done
echo "registry mirror: $ok new, $skip present, $bad failed"
exit 0
# Mirror the published branch only. primary (dev) never reaches Codeberg.
sync-codeberg:
runs-on: ubuntu-latest
needs: [rust-test, no-ai-attribution, action-pins]
if: github.event_name == 'push' && github.ref == 'refs/heads/public'
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
fetch-depth: 0
- name: Push public to Codeberg
run: |
if [ -z "${{ secrets.CODEBERG_TOKEN }}" ]; then
echo "[INFO] [sync] CODEBERG_TOKEN not set — skipping codeberg push"
exit 0
fi
git remote add codeberg-ci "https://${{ secrets.CODEBERG_TOKEN }}@codeberg.org/Fimeg/Souveraine.git"
git push codeberg-ci public:public
echo "Pushed public to codeberg.org/Fimeg/Souveraine"