fix workflow to mirror to GitLab #2
This file contains hidden or 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: Mirror to GitLab | |
on: | |
push: | |
branches: | |
- 'main' | |
workflow_call: | |
secrets: | |
GITLAB_TOKEN: | |
required: true | |
jobs: | |
mirror_to_gitlab: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Configure Git for GitLab | |
run: | | |
git remote add gitlab https://oauth2:${GITLAB_TOKEN}@gitlab.nullnet.ai/nullnet/${{github.event.repository.name}}.git | |
git config --global user.name "Giuliano Bellini" | |
git config --global user.email "[email protected]" | |
git pull | |
- name: Push to GitLab | |
run: | | |
git push gitlab main |