Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,20 @@ jobs:
echo "$CHANGED" | jq -c '.[]' | while read -r row; do
name=$(jq -r '.name' <<< "$row")
version=$(jq -r '.version' <<< "$row")
payload=$(jq -nc --arg n "$name" --arg v "$version" --arg sha "${{ github.sha }}" \
'{feature:$n, version:$v, ref:$sha, sha:$sha, source:"devcontainer-release"}')
echo "→ dispatch website: $name v$version"
# client_payload must be a JSON object, not a stringified one —
# gh api's "field[nested]=value" bracket syntax builds it as such.
# (A previous version passed a pre-serialized JSON string via
# --raw-field, which the API rejects with HTTP 422.)
gh api \
-X POST \
-H "Accept: application/vnd.github+json" \
"/repos/helpers4/website/dispatches" \
-f event_type=devcontainer-release \
--raw-field "client_payload=$payload" || echo "⚠️ dispatch failed for $name"
-f "client_payload[feature]=$name" \
-f "client_payload[version]=$version" \
-f "client_payload[ref]=${{ github.sha }}" \
-f "client_payload[sha]=${{ github.sha }}" \
-f "client_payload[source]=devcontainer-release" \
|| echo "⚠️ dispatch failed for $name"
done