Skip to content

Latest commit

 

History

History
42 lines (31 loc) · 1.51 KB

File metadata and controls

42 lines (31 loc) · 1.51 KB

GitLab Sync

Build Version Size

GitHub Action to mirror a repository to GitLab.

Usage 🚀

name: GitLab Sync
on: [push, create, delete, workflow_dispatch]

jobs:
  sync:
    name: GitLab Sync
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4
        with:
          # Required to mirror all branches and tags.
          fetch-depth: 0

      - uses: action-pack/gitlab-sync@v3
        with:
          username: your-gitlab-username
          url: https://gitlab.com/your-gitlab-namespace/your-repo.git
          # Personal access token with write access to the target GitLab repository.
          token: ${{ secrets.GITLAB_TOKEN }}

Notes

On GitLab.com, create a personal access token with the write_repository scope and save it as a GitHub secret, for example GITLAB_TOKEN. The target repository must already exist.

Stars 🌟

Stargazers