mirror of
https://github.com/igareck/vpn-configs-for-russia.git
synced 2026-05-19 13:56:14 +00:00
Зеркало / Mirror to GitLab
Создание зеркала на GitLab.com
This commit is contained in:
38
.github/workflows/mirror-to-gitlab.yml
vendored
Normal file
38
.github/workflows/mirror-to-gitlab.yml
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
name: Mirror to GitLab
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: mirror-to-gitlab
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
mirror:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout GitHub repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Push main branch to GitLab
|
||||
env:
|
||||
GITLAB_TOKEN: ${{ secrets.GITLAB_MIRROR_TOKEN }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
||||
git config user.name "github-actions"
|
||||
git config user.email "github-actions@github.com"
|
||||
|
||||
git remote remove gitlab 2>/dev/null || true
|
||||
git remote add gitlab "https://oauth2:${GITLAB_TOKEN}@gitlab.com/igareck/vpn-configs-for-russia.git"
|
||||
|
||||
git push gitlab HEAD:main
|
||||
Reference in New Issue
Block a user