Skip to content

Commit

Permalink
Add workflow for mirroring this repo on the ICL org
Browse files Browse the repository at this point in the history
Closes #9.
  • Loading branch information
alexdewar committed Nov 27, 2024
1 parent 60aa42c commit 42b8e1e
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/sync-mirror.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
on:
push:
workflow_dispatch:

jobs:
my_job:
if: github.repository == 'djmaxus/matlab-repo-init.git'
runs-on: ubuntu-latest
steps:
- uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Push changes to ImperialCollegeLondon/matlab-repo-init
run: |
# Clone and check out this repo
git clone --mirror git@github.com:djmaxus/matlab-repo-init.git
cd matlab-repo-init.git
# Add repo in Imperial's org as remote
git remote add icl git@github.com:ImperialCollegeLondon/matlab-repo-init.git
# Push all branches, overwriting if necessary
git push icl --all --force

0 comments on commit 42b8e1e

Please sign in to comment.