mirror of
https://github.com/base44/skills.git
synced 2026-09-14 16:22:01 +08:00
035970c832
* ci: notify Slack when a skill-sync PR opens * ci: use auto-skill-update label to identify skill-sync PRs Replace the brittle author + title-prefix discriminator with an explicit `auto-skill-update` label: - notify-slack-skill-sync.yml now fires on the label (present in the `opened` payload since the sync workflows attach it at creation), plus `labeled` for the case a label is applied just after creation. - sync-cli-skill.yml / sync-sdk-skill.yml ensure the label exists and create their PRs with it; adds `issues: write` and `Bash(gh label:*)`. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014uXhc3bU6WHd6Re843MP8W --------- Co-authored-by: Claude <noreply@anthropic.com>
60 lines
2.4 KiB
YAML
60 lines
2.4 KiB
YAML
name: Sync CLI Skill
|
|
|
|
on:
|
|
repository_dispatch:
|
|
types: [cli-release]
|
|
workflow_dispatch:
|
|
inputs:
|
|
cli_version:
|
|
description: 'CLI version tag to sync (e.g., v0.0.16)'
|
|
required: false
|
|
default: 'main'
|
|
additional_instructions:
|
|
description: 'Additional instructions for Claude (optional)'
|
|
required: false
|
|
default: ''
|
|
|
|
jobs:
|
|
sync-skill:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
issues: write # Required to create/apply the auto-skill-update label
|
|
id-token: write
|
|
|
|
steps:
|
|
- name: Checkout skills repo
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Checkout CLI repo
|
|
uses: actions/checkout@v4
|
|
with:
|
|
repository: base44/cli
|
|
ref: ${{ github.event.client_payload.version || inputs.cli_version || 'main' }}
|
|
path: base44-cli
|
|
fetch-depth: 0
|
|
fetch-tags: true
|
|
|
|
- name: Run Claude Code to sync skill
|
|
uses: anthropics/claude-code-action@v1
|
|
with:
|
|
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
|
|
allowed_bots: 'base44-github-actions[bot]'
|
|
claude_args: '--allowedTools "Edit,Write,MultiEdit,Bash(git:*),Bash(gh pr:*),Bash(gh label:*),Bash(mkdir:*)"'
|
|
prompt: |
|
|
read the skill in '.claude/skills/sync-cli-skill/SKILL.md' and follow the steps to sync the CLI skill.
|
|
|
|
CLI source folder path: ./base44-cli
|
|
CLI version: ${{ github.event.client_payload.version || inputs.cli_version || 'latest' }}
|
|
|
|
After syncing, create a pull request with the changes.
|
|
Before creating the PR, make sure the `auto-skill-update` label exists in the repo:
|
|
`gh label create auto-skill-update --color 1D76DB --description "Automated skill-sync PR" --force`
|
|
Then create the PR WITH that label in the same command: `gh pr create --label auto-skill-update ...`.
|
|
The label is the discriminator that downstream automation (e.g. the Slack notifier) uses to
|
|
recognize skill-sync PRs, so it must be attached at creation time.
|
|
PR title: "Update base44-cli skill to ${{ github.event.client_payload.version || inputs.cli_version || 'latest' }} {human-readable-time}"
|
|
|
|
${{ inputs.additional_instructions && format('Additional instructions: {0}', inputs.additional_instructions) || '' }}
|