GitLab to GitHub Sync #1018
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: GitLab to GitHub Sync | |
on: | |
schedule: | |
- cron: '* * * * *' | |
permissions: | |
contents: write | |
jobs: | |
sync: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
# (Add your setup for GitLab access here) | |
- name: Sync from GitLab | |
run: | | |
git remote add gitlab ${{ secrets.GITLAB_URL }} | |
git fetch --all --tags --prune | |
git checkout main | |
git merge --allow-unrelated-histories gitlab/main | |
git push --force |