Skip to content

Merge pull request #59 from modelstudioai/feat/bailian-docs-update #10

Merge pull request #59 from modelstudioai/feat/bailian-docs-update

Merge pull request #59 from modelstudioai/feat/bailian-docs-update #10

name: publish-skills
# Fires on pushes to main (including auto-merged PRs from
# feat/bailian-docs-update) and pokes the remote FC publisher,
# which syncs main -> OSS on its own (not part of this repo).
on:
push:
branches: [main]
paths: ['skills/**']
permissions:
contents: read
concurrency:
group: publish-skills
cancel-in-progress: false
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Poke FC publisher (publish-skills)
run: |
# FC uses reconciliation-based publishing: request body is not trusted.
# curl -f only catches HTTP errors; FC returns 200 + success:false on
# business failure, so we also parse the response body to surface it.
RESP=$(curl -fsS --retry 3 --retry-delay 5 -X POST \
"${{ vars.FC_TRIGGER_URL }}/publish-skills")
echo "$RESP" | jq .
if [ "$(echo "$RESP" | jq -r '.success')" != "true" ]; then
echo "::error::publish-skills failed: $(echo "$RESP" | jq -r '.error // "unknown"')"
exit 1
fi
echo "### publish-skills result" >> "$GITHUB_STEP_SUMMARY"
echo '```json' >> "$GITHUB_STEP_SUMMARY"
echo "$RESP" | jq '{upserted, deleted, unchanged: (.unchanged | length), durationMs}' >> "$GITHUB_STEP_SUMMARY"
echo '```' >> "$GITHUB_STEP_SUMMARY"