mirror of
https://github.com/terraphim/gitea-infrastructure.git
synced 2026-07-16 00:00:32 +02:00
- Complete mirroring guide (GitHub ↔ Gitea) - GitHub Actions workflow to sync to Gitea - Mirror status check workflow - SSH and token authentication methods - Troubleshooting guide
28 lines
808 B
YAML
28 lines
808 B
YAML
name: Sync to Gitea
|
|
|
|
on:
|
|
push:
|
|
branches: [main, master]
|
|
workflow_dispatch: # Allow manual trigger
|
|
|
|
jobs:
|
|
sync:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0 # Full history
|
|
|
|
- name: Push to Gitea
|
|
env:
|
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
|
run: |
|
|
git remote add gitea https://git.terraphim.cloud/terraphim/gitea-infrastructure.git
|
|
git config user.name "GitHub Actions"
|
|
git config user.email "actions@github.com"
|
|
|
|
# Push to Gitea with token authentication
|
|
# If using HTTPS with token: https://token@url
|
|
git push https://oauth2:${GITEA_TOKEN}@git.terraphim.cloud/terraphim/gitea-infrastructure.git main
|