ci(sync): mirror dev branch to Gitea on push
Some checks failed
Deploy / Deploy to Production (push) Has been cancelled

Fusion auto-merges tasks to local dev and pushes to GitHub dev. This
workflow keeps Gitea dev in sync so Coolify's Gitea webhook redeploys
dev.sase.tr.

Flow:
  Fusion task → local dev → github/dev push
                            → this workflow fires
                            → push to gitea/dev (origin)
                            → Coolify webhook → dev.sase.tr deploy

GITEA_PUSH_URL secret holds the authenticated Gitea remote URL.
This commit is contained in:
Semih
2026-05-11 00:34:21 +00:00
committed by Fusion
parent 55c237b049
commit 63b1a580a2

40
.github/workflows/sync-dev-to-gitea.yml vendored Normal file
View File

@@ -0,0 +1,40 @@
name: Sync dev → Gitea
# When dev is updated on GitHub (Fusion auto-push or manual), mirror it
# to Gitea so Coolify's Gitea webhook redeploys dev.sase.tr.
on:
push:
branches: [dev]
# Allow manual re-sync from the Actions tab
workflow_dispatch:
concurrency:
group: sync-dev-gitea
cancel-in-progress: false
jobs:
sync:
name: Mirror dev to Gitea
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout dev (full history)
uses: actions/checkout@v4
with:
ref: dev
fetch-depth: 0
- name: Push to Gitea
env:
GITEA_PUSH_URL: ${{ secrets.GITEA_PUSH_URL }}
run: |
set -euo pipefail
if [ -z "$GITEA_PUSH_URL" ]; then
echo "::error::GITEA_PUSH_URL secret not set"
exit 1
fi
# Fast-forward push; if Gitea has diverged, surface the failure
# rather than silently force-overwriting.
git push "$GITEA_PUSH_URL" HEAD:refs/heads/dev
echo "✓ dev synced to Gitea ($(git rev-parse --short HEAD))"