Skip to content

Loading...

Loading... #1

Workflow file for this run

name: Gitlab Mirror
on:
push:
branches:
- main
jobs:
sync_to_gitlab:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up GitLab
run: |
git config --global user.name "${{ secrets.GITLAB_USER }}"
git config --global user.email "${{ secrets.GITLAB_EMAIL }}"
env:
GITLAB_USER: ${{ secrets.GITLAB_USER }}
GITLAB_EMAIL: ${{ secrets.GITLAB_EMAIL }}
- name: Remove shallow update
run: git fetch --prune --unshallow
- name: Push to GitLab
run: |
git remote add gitlab https://oauth2:${{ secrets.GITLAB_TOKEN }}@gitlab.com/rmottapro/rmottapro.gitlab.io.git
git push --set-upstream gitlab --all
git push --set-upstream gitlab --tags
env:
GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }}