~samwhited/migration

ref: 7a307fa1b94695caf64a46117cb6be68863a2a5e migration/.github/workflows/mirror.yml -rw-r--r-- 452 bytes View raw
7a307fa1Sam Whited .github: auto close PRs and mirror from SourceHut 8 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
name: Mirror Repo
on:
  schedule:
    # Backup nightly
    - cron:  '0 0 * * *'

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - name: Mirror
      run: |
        git clone --mirror 'https://git.sr.ht/~samwhited/migration' repo
        cd repo/
        git remote add github "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY.git"
        git push --mirror github
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}