-
-
Notifications
You must be signed in to change notification settings - Fork 92
56 lines (50 loc) · 1.6 KB
/
Copy pathnotify-playbooks.yml
File metadata and controls
56 lines (50 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# notify-intent.yml — Drop this into your library repo's .github/workflows/
#
# Fires a repository_dispatch event to TanStack/intent whenever docs or
# source files change on merge to main. This triggers the skill staleness
# check workflow in the intent repo.
#
# Requirements:
# - A fine-grained PAT with contents:write on TanStack/intent stored
# as the INTENT_NOTIFY_TOKEN repository secret.
#
# Template variables (replaced by `intent setup`):
# @tanstack/devtools
# docs/**
# packages/*/src/**
name: Notify Intent
on:
push:
branches: [main]
paths:
- 'docs/**'
- 'packages/*/src/**'
permissions:
contents: read
jobs:
notify:
name: Notify TanStack Intent
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
fetch-depth: 2
persist-credentials: false
- name: Collect changed files
id: changes
run: |
FILES=$(git diff --name-only HEAD~1 HEAD | jq -R -s -c 'split("\n") | map(select(length > 0))')
echo "files=$FILES" >> "$GITHUB_OUTPUT"
- name: Dispatch to intent repo
uses: peter-evans/repository-dispatch@ff45666b9427631e3450c54a1bcbee4d9ff4d7c0 # v3.0.0
with:
token: ${{ secrets.INTENT_NOTIFY_TOKEN }}
repository: TanStack/intent
event-type: skill-check
client-payload: |
{
"package": "@tanstack/devtools",
"sha": "${{ github.sha }}",
"changed_files": ${{ steps.changes.outputs.files }}
}