~samwhited/mux

84c90236abf41ec70adc06f75007cca35d33d449 — Sam Whited 1 year, 26 days ago ca6835e
.github, .builds: sync repo to GitHub quicker
3 files changed, 12 insertions(+), 18 deletions(-)

R .builds/{freebsd.yml => ci.yml}
A .builds/sync.yml
D .github/workflows/mirror.yml
R .builds/freebsd.yml => .builds/ci.yml +0 -0

A .builds/sync.yml => .builds/sync.yml +12 -0
@@ 0,0 1,12 @@
image: alpine/edge
secrets:
  - 6fff3a68-f9e5-4e0e-9b19-ee7627ff573c
  - d66b1d1c-77da-4c7c-bd7a-afe0f83f34ed
tasks:
  - info: |
      git version
  - sync: |
      git clone --reference ./mux --mirror https://git.sr.ht/~samwhited/mux mux.git
      cd mux.git/
      cat ~/.ssh/github >> ~/.ssh/known_hosts
      git push --mirror git@github.com:soquee/mux.git

D .github/workflows/mirror.yml => .github/workflows/mirror.yml +0 -18
@@ 1,18 0,0 @@
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/mux'
        cd mux.git/
        git remote add github "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY.git"
        git push --mirror github
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}