From 3d13ff5a0f40b750f754898ab4568d4afc0f1a9e Mon Sep 17 00:00:00 2001 From: Greg Brown Date: Thu, 14 Jan 2021 11:47:17 +0000 Subject: Add GitHub action to mirror repo. --- .github/workflows/mirror.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/mirror.yml (limited to '.github/workflows') 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 }} -- cgit v1.2.3