Skip to content

Commit 51a0a54

Browse files
committed
ci(releases): notify website metadata updates
1 parent c8d4d04 commit 51a0a54

1 file changed

Lines changed: 50 additions & 0 deletions

File tree

‎.github/workflows/build-bundles.yml‎

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1068,3 +1068,53 @@ jobs:
10681068
--header "x-ci-signature: sha256=$SIGNATURE" \
10691069
--data "$PAYLOAD" \
10701070
"${WORKER_URL%/}/webhook"
1071+
1072+
notify-website-release-metadata:
1073+
name: Notify website release metadata
1074+
if: ${{ github.event_name == 'release' }}
1075+
needs:
1076+
- linux-bundles
1077+
- windows-bundles
1078+
- update-updater-json
1079+
- windows-msix
1080+
- macos-bundles
1081+
- notify-r2-release-sync
1082+
runs-on: ubuntu-22.04
1083+
1084+
steps:
1085+
- name: Dispatch website metadata update
1086+
env:
1087+
DISPATCH_TOKEN: ${{ secrets.GITMUN_WEBSITE_DISPATCH_TOKEN }}
1088+
GITHUB_API_URL: ${{ github.api_url }}
1089+
RELEASE_TAG: ${{ github.event.release.tag_name }}
1090+
RELEASE_URL: ${{ github.event.release.html_url }}
1091+
shell: bash
1092+
run: |
1093+
set -euo pipefail
1094+
1095+
if [ -z "${DISPATCH_TOKEN:-}" ]; then
1096+
echo "GITMUN_WEBSITE_DISPATCH_TOKEN is not configured." >&2
1097+
exit 1
1098+
fi
1099+
1100+
payload="$(
1101+
jq -cn \
1102+
--arg event_type "gitmun-release-assets-ready" \
1103+
--arg tag "$RELEASE_TAG" \
1104+
--arg release_url "$RELEASE_URL" \
1105+
'{
1106+
event_type: $event_type,
1107+
client_payload: {
1108+
tag: $tag,
1109+
release_url: $release_url
1110+
}
1111+
}'
1112+
)"
1113+
1114+
curl --fail-with-body \
1115+
--request POST \
1116+
--header "Accept: application/vnd.github+json" \
1117+
--header "Authorization: Bearer ${DISPATCH_TOKEN}" \
1118+
--header "X-GitHub-Api-Version: 2022-11-28" \
1119+
--data "$payload" \
1120+
"${GITHUB_API_URL%/}/repos/cst8t/gitmun-org-website/dispatches"

0 commit comments

Comments
 (0)