fix(ci): replace workflow dispatch with submodule bump push
CI / Build & Quality Checks (push) Successful in 12m21s
Trigger Desktop Build / trigger (push) Successful in 8s

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 <noreply@anthropic.com>
This commit is contained in:
2026-06-09 19:02:58 -04:00
parent ea15db430c
commit 8ff2f33d3a
+24 -7
View File
@@ -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