From 423047f8c947528d0a98aa920ed0caf03f28eee5 Mon Sep 17 00:00:00 2001 From: Ashwin Kumar Sivakumar Date: Sun, 5 Jul 2026 19:12:35 +0530 Subject: [PATCH] ci: add Forgejo Actions trigger after push --- .github/workflows/sync-to-forgejo.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/sync-to-forgejo.yml b/.github/workflows/sync-to-forgejo.yml index 07b6182..292a468 100644 --- a/.github/workflows/sync-to-forgejo.yml +++ b/.github/workflows/sync-to-forgejo.yml @@ -36,3 +36,16 @@ jobs: 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 + + - name: Trigger Forgejo Actions + env: + FORGEJO_TOKEN: ${{ secrets.FORGEJO_TOKEN }} + run: | + set -euo pipefail + # Trigger workflow dispatch via Forgejo API + BRANCH="${GITHUB_REF#refs/heads/}" + curl -s -X POST \ + -H "Authorization: token ${FORGEJO_TOKEN}" \ + -H "Content-Type: application/json" \ + "https://ci.nxtgauge.com/api/v1/repos/ashwin/${{ github.event.repository.name }}/actions/workflows/dispatches" \ + -d "{\"ref\":\"${BRANCH}\"}" || echo "Workflow trigger attempted"