peregrine/.forgejo/workflows/mirror.yml
pyr0ball 30423d7dd6
Some checks failed
CI / Backend (Python) (push) Failing after 1s
CI / Frontend (Vue) (push) Failing after 1s
CI / Backend (Python) (pull_request) Failing after 1s
CI / Frontend (Vue) (pull_request) Failing after 1s
fix(ci): restore green CI — ruff install + mirror secret rename
Two workflow fixes:
- ci.yml: add explicit `pip install ruff` before lint step; also add
  freeze/** to push trigger so RC branches run CI
- mirror.yml: rename GITHUB_MIRROR_TOKEN → GH_MIRROR_TOKEN to match
  org-level secret; Forgejo reserves the GITHUB_* prefix so that name
  was silently shadowed, causing mirror pushes to fail with auth errors
2026-06-26 19:25:10 -07:00

35 lines
1.1 KiB
YAML

# Mirror push to GitHub and Codeberg on every push to main or tag.
# Copied from Circuit-Forge/cf-agents workflows/mirror.yml
# Required secrets: GH_MIRROR_TOKEN, CODEBERG_MIRROR_TOKEN
# Note: Forgejo reserves the GITHUB_* prefix for secret names — use GH_* instead.
name: Mirror
on:
push:
branches: [main]
tags: ['v*']
jobs:
mirror:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Mirror to GitHub
env:
GH_MIRROR_PAT: ${{ secrets.GH_MIRROR_TOKEN }}
REPO: ${{ github.event.repository.name }}
run: |
git remote add github "https://x-access-token:${GH_MIRROR_PAT}@github.com/CircuitForgeLLC/${REPO}.git"
git push github --mirror
- name: Mirror to Codeberg
env:
CODEBERG_TOKEN: ${{ secrets.CODEBERG_MIRROR_TOKEN }}
REPO: ${{ github.event.repository.name }}
run: |
git remote add codeberg "https://CircuitForge:${CODEBERG_TOKEN}@codeberg.org/CircuitForge/${REPO}.git"
git push codeberg --mirror