Skip to content

Commit

Permalink
Mirror repository to gitlab
Browse files Browse the repository at this point in the history
  • Loading branch information
badouralix committed Jun 4, 2023
1 parent 706d851 commit 7c9507e
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/mirror.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: mirror

on: # yamllint disable-line rule:truthy
- create
- delete
- push
- workflow_dispatch

jobs:
gitlab:
name: gitlab
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Push to gitlab
env:
GITLAB_DEPLOY_KEY: ${{ secrets.GITLAB_DEPLOY_KEY }}
GITLAB_PUBLIC_KEY: gitlab.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAfuCHKVTjquxvt6CM6tdG4SLp1Btn/nOeHHE5UOzRdf
GITLAB_REPOSITORY: git@gitlab.com:${{ github.repository }}.git
run: |
eval `ssh-agent`
ssh-add - <<< $GITLAB_DEPLOY_KEY
install -D <(echo $GITLAB_PUBLIC_KEY) ~/.ssh/known_hosts
git push --force --prune $GITLAB_REPOSITORY +refs/remotes/origin/*:refs/heads/* +refs/tags/*:refs/tags/*
kill $SSH_AGENT_PID

0 comments on commit 7c9507e

Please sign in to comment.