mirror of
https://github.com/igareck/vpn-configs-for-russia.git
synced 2026-05-19 19:46:07 +00:00
39 lines
851 B
YAML
39 lines
851 B
YAML
name: Mirror to Codeberg
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: mirror-to-codeberg
|
|
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 Codeberg
|
|
env:
|
|
CODEBERG_TOKEN: ${{ secrets.CODEBERG_MIRROR_TOKEN }}
|
|
run: |
|
|
set -euo pipefail
|
|
|
|
git config user.name "github-actions"
|
|
git config user.email "github-actions@github.com"
|
|
|
|
git remote remove codeberg 2>/dev/null || true
|
|
git remote add codeberg "https://igareck:${CODEBERG_TOKEN}@codeberg.org/igareck/vpn-configs-for-russia.git"
|
|
|
|
git push codeberg HEAD:main --force
|