name: sync-to-gitea on: push: branches: - high-performance jobs: sync: runs-on: ubuntu-latest permissions: contents: write steps: - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 - name: Sync to Gitea env: GITEA_TOKEN: ${{ secrets.GITEA_SECRET }} REPO: ${{ github.event.repository.name }} BRANCH: ${{ github.ref_name }} run: | set -euo pipefail git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" GITEA_URL="https://Admin:${GITEA_TOKEN}@ci.nxtgauge.com/Admin/${REPO}.git" git remote remove gitea 2>/dev/null || true git remote add gitea "${GITEA_URL}" git ls-remote "${GITEA_URL}" >/dev/null git push "${GITEA_URL}" "HEAD:${BRANCH}" --force git push "${GITEA_URL}" --tags --force