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
66 changes: 66 additions & 0 deletions .github/workflows/notify-runner-agent.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Notify runner-agent SDK docs

on:
push:
tags:
- 'v*.*.*'
workflow_dispatch:
inputs:
tag:
description: Exact C++ SDK release tag to dispatch
required: true
type: string
commit:
description: Full commit SHA associated with the tag
required: true
type: string

permissions:
contents: read

jobs:
dispatch:
name: notify runner-agent
if: github.repository == 'milvus-io/milvus-sdk-cpp'
runs-on: ubuntu-latest
timeout-minutes: 5

env:
GH_TOKEN: ${{ secrets.PRIVATE_DISPATCH_TOKEN }}
TAG: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag || github.ref_name }}
COMMIT: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.commit || github.sha }}
SOURCE_REPO: milvus-io/milvus-sdk-cpp

steps:
- name: Send SDK release dispatch
run: |
set -euo pipefail

if [ -z "$GH_TOKEN" ]; then
echo "PRIVATE_DISPATCH_TOKEN is not configured" >&2
exit 1
fi

if [[ ! "$TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z][0-9A-Za-z.-]*)?$ ]]; then
echo "Unsupported tag format: $TAG" >&2
exit 1
fi

if ! [[ "$COMMIT" =~ ^[0-9a-f]{40}$ ]]; then
echo "Expected a full commit SHA, got: $COMMIT" >&2
exit 1
fi

gh api repos/yhmo/runner-agent/dispatches \
--method POST \
--input - <<EOF
{
"event_type": "sdk-release",
"client_payload": {
"sdk": "cpp",
"tag": "${TAG}",
"commit": "${COMMIT}",
"source_repo": "${SOURCE_REPO}"
}
}
EOF
Loading