name: Mirroring

on: [push, delete]

permissions:
  contents: read

concurrency:
  group: ${{ github.workflow }}

jobs:
  gitlab:
    name: GitLab
    runs-on: ubuntu-24.04
    steps:
      - name: Checkout code.
        run: git clone --mirror "https://github.com/${GITHUB_REPOSITORY}.git" "${GITHUB_WORKSPACE}"
      - name: Mirroring.
        run: git push --mirror "https://oauth2:${{ secrets.GITLAB_PERSONAL_ACCESS_TOKEN }}@gitlab.com/DeveloperC/${{ github.event.repository.name }}"
