File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -180,14 +180,21 @@ jobs:
180180 set -euo pipefail
181181 # Combine every per-package record into a single JSON array.
182182 jq -s '.' meta/*.json > records.json
183- # client_payload has a documented size cap (~64KB); 6 small records
184- # are well within it.
185- echo "records=$(jq -c '.' records.json)" >> "$GITHUB_OUTPUT"
183+ echo "Records to dispatch:"
184+ jq . records.json
185+ # Build the FULL request body with a properly nested client_payload.
186+ # gh api -f/-F send flat form fields and will NOT construct nested
187+ # objects (client_payload[records] would not become real nested JSON),
188+ # so we assemble the body explicitly and send it via --input.
189+ # client_payload has a documented ~64KB cap; 6 small records fit.
190+ jq -n --argjson records "$(cat records.json)" \
191+ '{event_type: "packages-publish", client_payload: {records: $records}}' \
192+ > dispatch-body.json
193+ jq . dispatch-body.json
186194
187195 - name : Dispatch rebuild on target repo
188196 env :
189197 GH_TOKEN : ${{ steps.token.outputs.token }}
190198 run : |
191- gh api "repos/${TARGET_REPO}/dispatches" \
192- -f event_type='packages-publish' \
193- -F client_payload[records]='${{ steps.payload.outputs.records }}'
199+ set -euo pipefail
200+ gh api --method POST "repos/${TARGET_REPO}/dispatches" --input dispatch-body.json
You can’t perform that action at this time.
0 commit comments