name: Trigger Desktop Build on: push: branches: [lotus] jobs: trigger: runs-on: ubuntu-latest steps: - name: Bump cinny submodule in cinny-desktop env: TOKEN: ${{ secrets.RELEASE_TOKEN }} ACTIONS_TOKEN: ${{ secrets.ACTIONS_TOKEN }} run: | CINNY_SHA="${{ github.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" git submodule update --init cinny git -C cinny fetch origin git -C cinny checkout "$CINNY_SHA" git add cinny if git diff --cached --quiet; then echo "Submodule already at $CINNY_SHA, nothing to do" else git commit -m "chore: bump cinny submodule to ${CINNY_SHA:0:8}" git push origin main fi echo "Dispatching cinny-desktop release workflow..." HTTP=$(curl -s -o /tmp/dispatch_body.txt -w "%{http_code}" -X POST \ "https://code.lotusguild.org/api/v1/repos/LotusGuild/cinny-desktop/actions/workflows/release.yml/dispatches" \ -H "Authorization: token $ACTIONS_TOKEN" \ -H "Content-Type: application/json" \ -d '{"ref":"main"}') echo "Dispatch HTTP status: $HTTP" cat /tmp/dispatch_body.txt || true if [ "$HTTP" -lt 200 ] || [ "$HTTP" -gt 299 ]; then echo "ERROR: dispatch failed with HTTP $HTTP" exit 1 fi echo "Dispatch succeeded."