Skip to content

feat: add Xiaohongshu Content Inspiration Expert skill with comprehen… #21

feat: add Xiaohongshu Content Inspiration Expert skill with comprehen…

feat: add Xiaohongshu Content Inspiration Expert skill with comprehen… #21

Workflow file for this run

name: Notify dsh repo
# Triggers the redfox-community-dsh repo's sync-skills.yml immediately
# whenever skills/ changes land on main, so the dsh mirror updates in
# near-real-time instead of waiting for its hourly schedule.
#
# Requires repo secret DSH_REPO_TOKEN (Settings → Secrets and variables
# → Actions): a PAT with write access to redfox-data/redfox-community-dsh.
# - fine-grained PAT: resource = redfox-community-dsh only,
# permission = Contents: Read and write
# - classic PAT: scope = repo
on:
push:
branches: [main]
paths:
- 'skills/**'
jobs:
notify:
runs-on: ubuntu-latest
steps:
- name: Check DSH_REPO_TOKEN
env:
DSH_REPO_TOKEN: ${{ secrets.DSH_REPO_TOKEN }}
run: |
if [ -z "$DSH_REPO_TOKEN" ]; then
echo "::error title=Missing secret::DSH_REPO_TOKEN 未配置。请到本仓库 Settings → Secrets and variables → Actions 新建 secret:对 redfox-data/redfox-community-dsh 有 Contents: Read and write 权限的 PAT(fine-grained 仅选该仓库;classic 用 repo scope)。未配置时实时同步不可用,dsh 仓每小时 cron 仍会兜底同步。"
exit 1
fi
echo "DSH_REPO_TOKEN is set (length ${#DSH_REPO_TOKEN})"
- name: repository_dispatch to redfox-community-dsh
env:
DSH_REPO_TOKEN: ${{ secrets.DSH_REPO_TOKEN }}
run: |
http_code=$(curl -sS -o /tmp/resp.json -w '%{http_code}' -X POST \
-H "Authorization: token $DSH_REPO_TOKEN" \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/redfox-data/redfox-community-dsh/dispatches \
-d '{"event_type":"skills-updated"}')
if [ "$http_code" != "204" ]; then
echo "::error title=Dispatch failed::HTTP $http_code $(cat /tmp/resp.json)"
exit 1
fi
echo "Dispatched skills-updated to redfox-data/redfox-community-dsh"