Files
2026-08-12 11:25:02 +03:00

60 lines
2.5 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@11d5960a326750d5838078e36cf38b85af677262 # v4
- name: Checkout CLI repo
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # 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@239e3a730883eeb5c53db12b0fc9573b3024b126 # 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) || '' }}