nxtgauge-admin-solid/.github/workflows/sync-to-gitea.yml
2026-04-19 15:59:58 +02:00

33 lines
889 B
YAML

name: sync-to-gitea
on:
push:
branches:
- main
jobs:
sync:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Push to Gitea high-performance
env:
GITEA_USERNAME: Admin
GITEA_TOKEN: ${{ secrets.GITEA_SECRET }}
run: |
set -euo pipefail
echo "Syncing ${{ github.event.repository.name }}:main → Gitea high-performance"
echo "Commit: $(git rev-parse HEAD)"
git remote add gitea "https://${GITEA_USERNAME}:${GITEA_TOKEN}@ci.nxtgauge.com/Admin/${{ github.event.repository.name }}.git"
git fetch gitea high-performance || true
git push gitea HEAD:high-performance --force-with-lease=refs/heads/high-performance
echo "Sync complete!"