Update gitlab_mirror.yml #7
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 | |
with: | |
fetch-depth: 0 | |
- name: Push to GitLab | |
run: | | |
git remote add gitlab https://oauth2:${{secrets.GITLAB_TOKEN}}@gitlab.nullnet.ai/nullnet/${{github.event.repository.name}}.git | |
git config --global user.name "${{github.actor}}" | |
git fetch gitlab main | |
git push gitlab main |