From 8ff2f33d3ab7001bb65c427e8d97713460c504f1 Mon Sep 17 00:00:00 2001 From: Jared Vititoe Date: Tue, 9 Jun 2026 19:02:58 -0400 Subject: [PATCH] fix(ci): replace workflow dispatch with submodule bump push MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit workflow_dispatch API requires Actions:write token scope which RELEASE_TOKEN doesn't have. Worse, even a successful dispatch would check out the old pinned submodule SHA, not the new cinny commit. New approach: clone cinny-desktop, point the cinny submodule at the current commit SHA, commit, and push. The push to cinny-desktop/main fires release.yml naturally — no special permissions needed beyond repo write (which RELEASE_TOKEN already has for release uploads). Co-Authored-By: Claude Sonnet 4.6 --- .gitea/workflows/trigger-desktop.yml | 31 +++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/.gitea/workflows/trigger-desktop.yml b/.gitea/workflows/trigger-desktop.yml index 21784eecd..1609e817a 100644 --- a/.gitea/workflows/trigger-desktop.yml +++ b/.gitea/workflows/trigger-desktop.yml @@ -8,13 +8,30 @@ jobs: trigger: runs-on: ubuntu-latest steps: - - name: Trigger cinny-desktop release build + - name: Bump cinny submodule in cinny-desktop and push env: TOKEN: ${{ secrets.RELEASE_TOKEN }} run: | - curl -sf -X POST \ - "https://code.lotusguild.org/api/v1/repos/LotusGuild/cinny-desktop/actions/workflows/release.yml/dispatches" \ - -H "Authorization: token $TOKEN" \ - -H "Content-Type: application/json" \ - -d '{"ref":"main"}' - echo "Desktop build triggered" + CINNY_SHA="${{ github.sha }}" + echo "Bumping cinny submodule to $CINNY_SHA" + + git clone "https://x-access-token:$TOKEN@code.lotusguild.org/LotusGuild/cinny-desktop.git" desktop + cd desktop + + git config user.email "ci@lotusguild.org" + git config user.name "Lotus CI" + + # Fetch the cinny submodule and point it at the new SHA + git submodule update --init cinny + git -C cinny fetch origin + git -C cinny checkout "$CINNY_SHA" + + git add cinny + # Only commit + push if the submodule pointer actually changed + if git diff --cached --quiet; then + echo "Submodule already at $CINNY_SHA — no push needed" + else + git commit -m "chore: bump cinny submodule to ${CINNY_SHA:0:8}" + git push origin main + echo "Pushed — cinny-desktop release build triggered" + fi