Accept coming changes #80
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: Sync GitLab | |
on: | |
push: | |
branches: [ "mvn-multimodules" ] | |
workflow_dispatch: | |
jobs: | |
mirror: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Git | |
run: | | |
git config --global user.name "github-actions" | |
git config --global user.email "[email protected]" | |
git config --global pull.rebase false | |
- name: Fetch all branches | |
run: git fetch --all | |
- name: Checkout mvn-multimodules branch | |
run: git checkout mvn-multimodules | |
- name: Sync GitLab | |
env: | |
GITLAB_REPO: ${{ secrets.GITLAB_REPO }} | |
GITLAB_ACCESS_TOKEN: ${{ secrets.GITLAB_ACCESS_TOKEN }} | |
run: | | |
git remote add gitlab "https://oauth2:${GITLAB_ACCESS_TOKEN}@${GITLAB_REPO}" | |
git pull gitlab mvn-multimodules --strategy-option theirs | |
git push gitlab mvn-multimodules |