Skip to content

Commit

Permalink
ci/cd: set up mirroring to wikimedia gitlab
Browse files Browse the repository at this point in the history
  • Loading branch information
siddharthvp committed Jun 27, 2024
1 parent 71ec0c8 commit c2d2b1b
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/ci-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,21 @@ jobs:
host: login.toolforge.org
username: ${{ secrets.TOOLFORGE_USERNAME }}
key: ${{ secrets.TOOLFORGE_PRIVATE_KEY }}

mirror:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # all branches and tags
- run: |
mkdir -p ~/.ssh
echo -e "$KEY" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
git remote add gitlab "[email protected]:sd/mwn.git"
git push gitlab master
git push gitlab --tags
rm -rf ~/.ssh
env:
KEY: ${{ secrets.TOOLFORGE_PRIVATE_KEY }}

0 comments on commit c2d2b1b

Please sign in to comment.