We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 86ba3d5 commit bc82d88Copy full SHA for bc82d88
.github/workflows/mirroring.yml
@@ -0,0 +1,17 @@
1
+name: Mirroring
2
+
3
+on: [push, delete]
4
5
+concurrency:
6
+ group: ${{ github.workflow }}
7
8
+jobs:
9
+ GitLab:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - name: Checkout code.
13
+ run: git clone --mirror "https://github.com/${GITHUB_REPOSITORY}.git" "${GITHUB_WORKSPACE}"
14
+ - name: Get GitLab repository.
15
+ run: echo "REPOSITORY_NAME=$(echo "${GITHUB_REPOSITORY}" | sed "s|^${GITHUB_REPOSITORY_OWNER}/||g")" >> "${GITHUB_ENV}"
16
+ - name: Mirroring.
17
+ run: git push --mirror "https://oauth2:${{ secrets.GITLAB_PERSONAL_ACCESS_TOKEN }}@gitlab.com/DeveloperC/${REPOSITORY_NAME}"
0 commit comments