Add workflow for mirroring this repo on the ICL org #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |