breadpaper/.forgejo/workflows/mirror.yml
Breadway 7f87ef311c
Some checks failed
Mirror to GitHub / mirror (push) Failing after 3s
debug: GIT_CURL_VERBOSE trace
2026-06-17 14:40:22 +08:00

21 lines
684 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}"
GIT_CURL_VERBOSE=1 git clone --mirror "https://git.breadway.dev/${GITHUB_REPOSITORY}.git" repo.git 2>&1 | head -40 || true
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/*'