Skip to content

Update dependencies

Update dependencies #5

Workflow file for this run

name: Mirror
on:
pull_request:
types: [closed]
branches: [ "main" ]
jobs:
sync_to_gitlab:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Extract repository name
id: extract_repo_name
run: echo "::set-output name=reponame::$(echo $GITHUB_REPOSITORY | cut -d'/' -f2)"
- name: Set up Git
run: |
git config --global user.name "${{ secrets.GITLAB_USER }}"
git config --global user.email "${{ secrets.GITLAB_EMAIL }}"
- name: Sync to GitLab
run: |
git remote add gitlab https://oauth2:${{ secrets.GITLAB_TOKEN }}@gitlab.com/rmottanet/${{ steps.extract_repo_name.outputs.reponame }}.git
git fetch --prune --unshallow
git checkout main
git merge --allow-unrelated-histories -X theirs --no-edit origin/main
git push gitlab main
env:
GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }}