Skip to content

Finish 0.1.5

Finish 0.1.5 #4

Workflow file for this run

name: Notify Website of CLI Release
on:
push:
tags:
- '[0-9]*.[0-9]*.[0-9]*'
jobs:
notify:
runs-on: ubuntu-latest
steps:
- name: Dispatch cli-docs-updated event to directive-website
env:
TOKEN: ${{ secrets.WEBSITE_DEPLOY_TOKEN }}
TAG: ${{ github.ref_name }}
run: |
set -euo pipefail
body="$(jq -nc --arg tag "$TAG" \
'{event_type:"cli-docs-updated", client_payload:{tag:$tag}}')"
code="$(
curl -sS -o resp.json -w "%{http_code}" \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $TOKEN" \
-H "X-GitHub-Api-Version: 2022-11-28" \
-X POST "https://api.github.com/repos/cceconi/directive-website/dispatches" \
-d "$body" || true
)"
echo "HTTP $code"
cat resp.json
test "$code" = "204"