~samwhited/mux

40b47636df0d66454dbca26da8944d7604a0228c — Sam Whited 1 year, 25 days ago 84c9023
.github/workflows: add mirror workflow back

Using builds.sr.ht to sync the repos works quicker, but builds won't be
triggered unless a new ref is created. For example, if we 'git push
--delete origin somebranch', the build won't be run.
Fill in any gaps by leaving the nighly GitHub action in place for now.
1 files changed, 17 insertions(+), 0 deletions(-)

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