summaryrefslogtreecommitdiff
path: root/.github/workflows/mirror.yml
blob: 4ebd7419e940855f8c494a2eb238af2cf0ede13a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
name: Mirror Repo
on:
  schedule:
    # nightly (0th hour 0th minute of every day)
    - cron:  '0 0 * * *'

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