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