Skip to content

Commit eec88e9

Browse files
ci: simplifying mirroring workflow (#105)
1 parent 75fe239 commit eec88e9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.github/workflows/mirroring.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: Mirroring
22

33
on: [push, delete]
44

5+
permissions:
6+
contents: read
7+
58
concurrency:
69
group: ${{ github.workflow }}
710

@@ -11,7 +14,5 @@ jobs:
1114
steps:
1215
- name: Checkout code.
1316
run: git clone --mirror "https://github.com/${GITHUB_REPOSITORY}.git" "${GITHUB_WORKSPACE}"
14-
- name: Get GitLab repository.
15-
run: echo "REPOSITORY_NAME=${GITHUB_REPOSITORY/${GITHUB_REPOSITORY_OWNER}/}" >> "${GITHUB_ENV}"
1617
- name: Mirroring.
17-
run: git push --mirror "https://oauth2:${{ secrets.GITLAB_PERSONAL_ACCESS_TOKEN }}@gitlab.com/DeveloperC/${REPOSITORY_NAME}"
18+
run: git push --mirror "https://oauth2:${{ secrets.GITLAB_PERSONAL_ACCESS_TOKEN }}@gitlab.com/DeveloperC/${{ github.event.repository.name }}"

0 commit comments

Comments
 (0)