Skip to content

Commit e438ffb

Browse files
authored
Fix JSON payload formatting in beta dispatch
Updated the dispatch command to use single quotes for JSON payload.
1 parent 8b101f0 commit e438ffb

1 file changed

Lines changed: 11 additions & 10 deletions

File tree

.github/workflows/send-beta-build.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ jobs:
6767
- name: Upload artifact
6868
uses: actions/upload-artifact@v4
6969
with:
70-
# Use the dynamic zip name as the artifact name too
7170
name: ${{ steps.set-zip-name.outputs.zip_name }}
7271
path: ${{ steps.set-zip-name.outputs.zip_name }}
7372
retention-days: 1
@@ -98,6 +97,8 @@ jobs:
9897

9998
- name: Dispatch to beta repo
10099
run: |
100+
set -euo pipefail
101+
101102
SUBFOLDER="${{ steps.set-zip-name.outputs.subfolder }}"
102103
ARTIFACT_URL="${{ steps.get-artifact.outputs.url }}"
103104
ZIP_NAME="${{ steps.set-zip-name.outputs.zip_name }}"
@@ -111,13 +112,13 @@ jobs:
111112
-H "Authorization: token ${{ secrets.BETA_PAT_TOKEN }}" \
112113
-H "Accept: application/vnd.github+json" \
113114
https://api.github.com/repos/HTMLToolkit/beta/dispatches \
114-
-d "{
115-
\"event_type\": \"deploy-build\",
116-
\"client_payload\": {
117-
\"source_repo\": \"${{ github.repository }}\",
118-
\"artifact_url\": \"${ARTIFACT_URL}\",
119-
\"token\": \"${{ secrets.GITHUB_TOKEN }}\",
120-
\"subfolder\": \"${SUBFOLDER}\",
121-
\"zip_name\": \"${ZIP_NAME}\"
115+
-d '{
116+
"event_type": "deploy-build",
117+
"client_payload": {
118+
"source_repo": "'"${{ github.repository }}"'",
119+
"artifact_url": "'"${ARTIFACT_URL}"'",
120+
"token": "'"${{ secrets.GITHUB_TOKEN }}"'",
121+
"subfolder": "'"${SUBFOLDER}"'",
122+
"zip_name": "'"${ZIP_NAME}"'"
122123
}
123-
}"
124+
}'

0 commit comments

Comments
 (0)