Skip to content

Mirror

Mirror #28

Workflow file for this run

---
name: mirror
run-name: Mirror
on:
push:
branches:
- "main"
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
skip_duplicate_actions:
name: Skip Duplicate Actions
runs-on: ubuntu-latest
steps:
- uses: fkirc/skip-duplicate-actions@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
cancel_others: true
concurrent_skipping: never
mirror_to_gitlab:
name: Mirror to GitLab
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Mirror to GitLab
run: |
mkdir mirror && cd mirror
git clone --bare "https://github.com/$GITHUB_REPOSITORY" .
git push --mirror "https://$GITLAB_OWNER:[email protected]/$GITLAB_REPOSITORY.git"
env:
GITLAB_REPOSITORY: ${{ secrets.GITLAB_REPOSITORY }}
GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }}
GITLAB_OWNER: ${{ secrets.GITLAB_OWNER }}