ci: remove redundant workflow_dispatch from trigger-desktop.yml
Pushing to cinny-desktop main already fires release.yml via on:push. The explicit API dispatch call was redundant, caused double-job runs, and failed with 401 when the temporary admin token expired. Removed. DISPATCH_TOKEN secret is no longer needed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -8,10 +8,9 @@ jobs:
|
|||||||
trigger:
|
trigger:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Bump cinny submodule and dispatch desktop build
|
- name: Bump cinny submodule
|
||||||
env:
|
env:
|
||||||
TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||||
DISPATCH_TOKEN: ${{ secrets.DISPATCH_TOKEN }}
|
|
||||||
run: |
|
run: |
|
||||||
CINNY_SHA="${{ github.sha }}"
|
CINNY_SHA="${{ github.sha }}"
|
||||||
git clone "https://x-access-token:$TOKEN@code.lotusguild.org/LotusGuild/cinny-desktop.git" desktop
|
git clone "https://x-access-token:$TOKEN@code.lotusguild.org/LotusGuild/cinny-desktop.git" desktop
|
||||||
@@ -23,22 +22,9 @@ jobs:
|
|||||||
git -C cinny checkout "$CINNY_SHA"
|
git -C cinny checkout "$CINNY_SHA"
|
||||||
git add cinny
|
git add cinny
|
||||||
if git diff --cached --quiet; then
|
if git diff --cached --quiet; then
|
||||||
echo "Submodule already at $CINNY_SHA, skipping commit"
|
echo "Submodule already at $CINNY_SHA, nothing to do"
|
||||||
else
|
else
|
||||||
git commit -m "chore: bump cinny submodule to ${CINNY_SHA:0:8}"
|
git commit -m "chore: bump cinny submodule to ${CINNY_SHA:0:8}"
|
||||||
git push origin main
|
git push origin main
|
||||||
fi
|
echo "Pushed — cinny-desktop release.yml will start via on:push trigger"
|
||||||
echo "Dispatching cinny-desktop release.yml on ref=main ..."
|
|
||||||
HTTP=$(curl -s -o /tmp/dispatch_resp.json -w "%{http_code}" -X POST \
|
|
||||||
"https://code.lotusguild.org/api/v1/repos/LotusGuild/cinny-desktop/actions/workflows/release.yml/dispatches" \
|
|
||||||
-H "Authorization: token $DISPATCH_TOKEN" \
|
|
||||||
-H "Content-Type: application/json" \
|
|
||||||
-d '{"ref":"main"}')
|
|
||||||
echo "HTTP $HTTP"
|
|
||||||
cat /tmp/dispatch_resp.json 2>/dev/null || true
|
|
||||||
if [ "$HTTP" -ge 200 ] && [ "$HTTP" -lt 300 ]; then
|
|
||||||
echo "Dispatch succeeded (HTTP $HTTP)"
|
|
||||||
else
|
|
||||||
echo "ERROR: dispatch returned HTTP $HTTP — check DISPATCH_TOKEN scope"
|
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user