snipe/.forgejo/workflows/mirror.yml
pyr0ball 6f2e97a166
Some checks are pending
CI / API — lint + test (pull_request) Waiting to run
CI / Web — typecheck + test + build (pull_request) Waiting to run
fix: rename GITHUB_MIRROR_TOKEN to GH_MIRROR_TOKEN (Forgejo blocks GITHUB_ prefix)
2026-04-06 00:04:42 -07:00

37 lines
931 B
YAML

name: Mirror
on:
push:
branches: [main]
tags: ["v*"]
jobs:
mirror-github:
name: Mirror to GitHub
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Push to GitHub
env:
GH_MIRROR_TOKEN: ${{ secrets.GH_MIRROR_TOKEN }}
run: |
git remote add github https://x-access-token:${GH_MIRROR_TOKEN}@github.com/CircuitForgeLLC/snipe.git
git push github --mirror
mirror-codeberg:
name: Mirror to Codeberg
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Push to Codeberg
env:
CODEBERG_MIRROR_TOKEN: ${{ secrets.CODEBERG_MIRROR_TOKEN }}
run: |
git remote add codeberg https://CircuitForge:${CODEBERG_MIRROR_TOKEN}@codeberg.org/CircuitForge/snipe.git
git push codeberg --mirror