replica-omnisciente/.forgejo/workflows/mirror-sync.yml
Raphael Cautus (Maestro) 39fb44fe0e feat(infra): proxmox IaC, firmware, savearth realm, lab-gateway ESP, CI
- infrastructure/proxmox/: CT provisioning configs
- infrastructure/fabric/gitops/: GitOps layer
- fleet.yaml: GPU inventory (Dell GTX 1050 vfio-pci passthrough)
- firmware/: ESP32 firmware tree (67 files, 6.9MB)
- realms/savearth/: Savearth team realm with heteronyms
- lab-gateway: ESP client + manager
- CI: Forgejo + GitHub Actions workflows

Co-authored-by: Álvaro de Campos <campos@portugalfuturista.org>
2026-07-31 14:57:41 +01:00

71 lines
2.6 KiB
YAML

name: Mirror Sync (constant replication)
# Constant replication of upstream sources into self-hosted mirrors:
# GitHub → Forgejo, Jira → Plane, Confluence → Outline
#
# Runs every 15 minutes via schedule + on-demand. Tokens come from Forgejo
# secrets (mirror-secrets) which are populated from Vaultwarden.
#
# The sync is idempotent and read-only (upstream is source of truth).
# RL reward signals are emitted to .aurelio/brain/trajectory-rewards/ on each run.
on:
schedule:
- cron: '*/15 * * * *' # every 15 minutes
workflow_dispatch:
inputs:
target:
description: 'Mirror target (forgejo, plane, outline, or all)'
required: false
default: 'all'
dry_run:
description: 'Dry run (no API calls)'
type: boolean
required: false
default: false
concurrency:
group: mirror-sync
cancel-in-progress: false # don't cancel a running sync
jobs:
sync:
name: Mirror Sync
runs-on: [self-hosted, linux, x64]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Validate mirror catalog
run: |
python3 scripts/sync-mirrors.py --check
- name: Run mirror sync
env:
FORGEJO_MIRROR_TOKEN: ${{ secrets.FORGEJO_MIRROR_TOKEN }}
GITHUB_MIRROR_TOKEN: ${{ secrets.GITHUB_MIRROR_TOKEN }}
PLANE_API_TOKEN: ${{ secrets.PLANE_API_TOKEN }}
OUTLINE_API_TOKEN: ${{ secrets.OUTLINE_API_TOKEN }}
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
CONFLUENCE_API_TOKEN: ${{ secrets.CONFLUENCE_API_TOKEN }}
CONFLUENCE_USER_EMAIL: ${{ secrets.CONFLUENCE_USER_EMAIL }}
run: |
TARGET="${{ github.event.inputs.target || 'all' }}"
DRY="${{ github.event.inputs.dry_run || 'false' }}"
if [ "$DRY" = "true" ]; then
python3 scripts/sync-mirrors.py --sync "$TARGET" --dry-run
else
python3 scripts/sync-mirrors.py --sync "$TARGET"
fi
- name: Commit sync state + reward signals
run: |
git config user.name "Mirror Sync CI"
git config user.email "mirror-ci@portugalfuturista.org"
# Commit the state file + reward signals if they changed.
git add .aurelio/mirrors/state/last-sync.json \
.aurelio/brain/trajectory-rewards/mirror-sync.jsonl 2>/dev/null || true
git diff --staged --quiet || git commit -m "chore(mirror): sync state + RL rewards [skip ci]"
git push || echo "nothing to push"