From 3ebc5bd20c6613c0d8579340a512c3b02c0b2e74 Mon Sep 17 00:00:00 2001 From: DeveloperC Date: Wed, 18 Jun 2025 01:05:01 +0100 Subject: [PATCH] ci: simplifying mirroring workflow --- .github/workflows/mirroring.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/mirroring.yml b/.github/workflows/mirroring.yml index ac3b7a8..8654b8f 100644 --- a/.github/workflows/mirroring.yml +++ b/.github/workflows/mirroring.yml @@ -2,6 +2,9 @@ name: Mirroring on: [push, delete] +permissions: + contents: read + concurrency: group: ${{ github.workflow }} @@ -11,7 +14,5 @@ jobs: steps: - name: Checkout code. run: git clone --mirror "https://github.com/${GITHUB_REPOSITORY}.git" "${GITHUB_WORKSPACE}" - - name: Get GitLab repository. - run: echo "REPOSITORY_NAME=${GITHUB_REPOSITORY/${GITHUB_REPOSITORY_OWNER}/}" >> "${GITHUB_ENV}" - name: Mirroring. - run: git push --mirror "https://oauth2:${{ secrets.GITLAB_PERSONAL_ACCESS_TOKEN }}@gitlab.com/DeveloperC/${REPOSITORY_NAME}" + run: git push --mirror "https://oauth2:${{ secrets.GITLAB_PERSONAL_ACCESS_TOKEN }}@gitlab.com/DeveloperC/${{ github.event.repository.name }}"