ci: sync GitHub pushes to Forgejo
Some checks failed
build-and-release / build (push) Failing after 1s

This commit is contained in:
Ashwin Kumar Sivakumar 2026-07-03 18:59:00 +05:30
parent 6604842788
commit 48ef3e23f5

View file

@ -7,6 +7,13 @@ on:
- high-performance
workflow_dispatch:
permissions:
contents: read
concurrency:
group: sync-to-forgejo-${{ github.ref }}
cancel-in-progress: true
jobs:
sync:
runs-on: ubuntu-latest
@ -26,11 +33,6 @@ jobs:
FORGEJO_TOKEN: ${{ secrets.FORGEJO_TOKEN }}
run: |
set -euo pipefail
# Add Forgejo remote
git remote add forgejo "https://admin:${FORGEJO_TOKEN}@ci.nxtgauge.com/ashwin/nxtgauge-frontend-solid.git" 2>/dev/null || \
git remote set-url forgejo "https://admin:${FORGEJO_TOKEN}@ci.nxtgauge.com/ashwin/nxtgauge-frontend-solid.git"
# Push current branch to Forgejo
git push forgejo HEAD:${GITHUB_REF#refs/heads/} --force
echo "✅ Successfully synced ${GITHUB_REF} to Forgejo"
git remote add forgejo "https://admin:${FORGEJO_TOKEN}@ci.nxtgauge.com/ashwin/${{ github.event.repository.name }}.git" 2>/dev/null || \
git remote set-url forgejo "https://admin:${FORGEJO_TOKEN}@ci.nxtgauge.com/ashwin/${{ github.event.repository.name }}.git"
git push forgejo "HEAD:${GITHUB_REF#refs/heads/}" --force