summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Brown <gmb60@cam.ac.uk>2021-01-14 11:47:17 +0000
committerGreg Brown <gmb60@cam.ac.uk>2021-01-14 11:47:17 +0000
commit3d13ff5a0f40b750f754898ab4568d4afc0f1a9e (patch)
tree822613fd3c9e25b3966fff506b7f0a68d979a585
parentaac3549a72663c523a456b2f5d7c3b77f509cdd6 (diff)
Add GitHub action to mirror repo.
-rw-r--r--.github/workflows/mirror.yml18
1 files changed, 18 insertions, 0 deletions
diff --git a/.github/workflows/mirror.yml b/.github/workflows/mirror.yml
new file mode 100644
index 0000000..e4ba71b
--- /dev/null
+++ b/.github/workflows/mirror.yml
@@ -0,0 +1,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 }}