Skip to content
Closed
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
38 changes: 38 additions & 0 deletions .github/workflows/dispatch-sdk-updates.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Notify SDKs of published spec updates

on:
push:
branches: [main]
workflow_dispatch:

permissions:
contents: read

jobs:
dispatch:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
repository:
- braintrust-sdk-rust
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Create scoped notification token
id: bot
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
with:
app-id: ${{ vars.SDK_DISPATCH_APP_ID }}
private-key: ${{ secrets.SDK_DISPATCH_APP_PRIVATE_KEY }}
owner: braintrustdata
repositories: ${{ matrix.repository }}
permission-contents: write
- name: Notify SDK receiver
env:
GH_TOKEN: ${{ steps.bot.outputs.token }}
SDK_REPOSITORY: ${{ matrix.repository }}
run: |
set -euo pipefail
gh api --method POST "repos/braintrustdata/$SDK_REPOSITORY/dispatches" \
-f event_type=braintrust-openapi-updated
Loading