mirror of
https://github.com/dexoron/dcr.git
synced 2026-10-21 09:08:30 +00:00
feat: add automated repository mirroring workflows and update docs
- Add GitHub Actions workflows for code and release mirroring - Remove manual sync-releases-to-gitlab.py script - Update .gitignore to track .github/ directory - Document repository mirrors and VS Code extension recommendations
This commit is contained in:
37
.github/workflows/code-mirror.yml
vendored
Normal file
37
.github/workflows/code-mirror.yml
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
name: Mirror source code to GitVerse
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '**'
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: code-mirror-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
mirror:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Mirror all branches
|
||||
env:
|
||||
GITVERSE_PAT: ${{ secrets.GITVERSE_PAT }}
|
||||
GITVERSE_ORG: ${{ vars.GITVERSE_ORG || 'dcr_labs' }}
|
||||
GITVERSE_REPO: ${{ vars.GITVERSE_REPO || 'dcr' }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
test -n "$GITVERSE_PAT" || { echo 'GITVERSE_PAT is not configured' >&2; exit 1; }
|
||||
remote="https://oauth2:${GITVERSE_PAT}@gitverse.ru/${GITVERSE_ORG}/${GITVERSE_REPO}.git"
|
||||
git remote add gitverse "$remote"
|
||||
# Populate local refs first, so a manual run mirrors every branch too.
|
||||
git fetch origin '+refs/heads/*:refs/heads/*'
|
||||
git push --prune --force gitverse 'refs/heads/*:refs/heads/*'
|
||||
Reference in New Issue
Block a user