Skip to content

Commit

Permalink
ci: adding mirroring workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
DeveloperC286 committed Oct 9, 2023
1 parent 35135e4 commit 09f083c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/mirroring.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Mirroring

on: [push, delete]

jobs:
GitLab:
runs-on: ubuntu-latest
steps:
- name: Checkout code.
run: git clone --mirror "https://github.com/${GITHUB_REPOSITORY}.git" "${GITHUB_WORKSPACE}"
- name: Get GitLab repository.
run: echo "REPOSITORY_NAME=$(echo "${GITHUB_REPOSITORY}" | sed "s|^${GITHUB_REPOSITORY_OWNER}/||g")" >> "${GITHUB_ENV}"
- name: Mirroring.
run: git push --mirror "https://oauth2:${{ secrets.GITLAB_PERSONAL_ACCESS_TOKEN }}@gitlab.com/DeveloperC/${REPOSITORY_NAME}"

0 comments on commit 09f083c

Please sign in to comment.