Skip to content

Commit b8db44e

Browse files
committed
ci: simplifying mirroring workflow
1 parent f69daf1 commit b8db44e

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)