breadpaper/.forgejo/workflows/mirror.yml
Breadway 758112d93f
Some checks failed
Mirror to GitHub / mirror (push) Failing after 3s
debug: add git env and system config inspection
2026-06-17 14:38:34 +08:00

24 lines
942 B
YAML

name: Mirror to GitHub
on:
push:
branches: ['**']
tags: ['**']
jobs:
mirror:
runs-on: [self-hosted, hestia]
steps:
- name: Mirror to GitHub
run: |
set -euo pipefail
echo "GITHUB_REPOSITORY=${GITHUB_REPOSITORY}"
echo "GITHUB_SERVER_URL=${GITHUB_SERVER_URL:-unset}"
env | grep -iE "^GIT" | sort || echo "(no GIT env vars)"
git config --list --global | grep -E "url|insteadOf" || echo "(no url rewrites in global gitconfig)"
git config --list --system 2>/dev/null | grep -E "url|insteadOf" || echo "(no url rewrites in system gitconfig)"
git clone --mirror "https://git.breadway.dev/${GITHUB_REPOSITORY}.git" repo.git
cd repo.git
git push --prune \
"https://x-access-token:${{ secrets.MIRROR_TOKEN }}@github.com/Breadway/breadpaper.git" \
'+refs/heads/*:refs/heads/*' '+refs/tags/*:refs/tags/*'