Skip to content

Commit

Permalink
ci/cd: use --force-with-lease for gitlab mirroring
Browse files Browse the repository at this point in the history
  • Loading branch information
siddharthvp committed Jun 27, 2024
1 parent c2d2b1b commit 2592861
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/ci-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,15 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # all branches and tags
- run: |
- name: Mirror to Gitlab
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 master --force-with-lease
git push gitlab --tags
rm -rf ~/.ssh
env:
KEY: ${{ secrets.TOOLFORGE_PRIVATE_KEY }}
KEY: ${{ secrets.GITLAB_PRIVATE_KEY }}

0 comments on commit 2592861

Please sign in to comment.