chore: 接入 CI/CD skill 注册流程
register-skill-release / register (push) Successful in 29s
Details
register-skill-release / register (push) Successful in 29s
Details
新增 .forgejo/workflows/register-skill-release.yml,推送 v* tag 时自动注册 skill。 install.sh 同步 template-skill,支持 auth-rt 自动安装。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
cabd1b332a
commit
985e822ff2
|
|
@ -0,0 +1,17 @@
|
||||||
|
name: register-skill-release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v*'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
register:
|
||||||
|
runs-on: docker
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- uses: http://192.168.0.108:3030/agent-skills/shared-actions/register-skill@main
|
||||||
|
with:
|
||||||
|
client_key: ${{ secrets.CLIENT_KEY }}
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
node_modules/
|
node_modules/
|
||||||
dist/
|
dist/
|
||||||
.env
|
.env
|
||||||
|
.env.local
|
||||||
|
*.skill
|
||||||
snapshots_*/
|
snapshots_*/
|
||||||
*.jpg
|
*.jpg
|
||||||
*.mp4
|
*.mp4
|
||||||
|
|
|
||||||
32
install.sh
32
install.sh
|
|
@ -1,11 +1,29 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
cd "$(dirname "$0")"
|
||||||
|
|
||||||
SKILL_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
# Auto-install auth-rt if not found
|
||||||
|
if ! command -v auth-rt &>/dev/null && [ ! -x "$HOME/.local/bin/auth-rt" ]; then
|
||||||
|
echo "auth-rt not found, installing..."
|
||||||
|
_FORGEJO="http://192.168.0.108:3030"
|
||||||
|
_OS="$(uname -s | tr '[:upper:]' '[:lower:]')"
|
||||||
|
_ARCH="$(uname -m)"; case "$_ARCH" in x86_64) _ARCH="amd64";; aarch64) _ARCH="arm64";; esac
|
||||||
|
_URL="$_FORGEJO/agent-skills/auth-runtime/releases/download/latest/auth-rt-${_OS}-${_ARCH}"
|
||||||
|
mkdir -p "$HOME/.local/bin"
|
||||||
|
if curl -fsSL "$_URL" -o "$HOME/.local/bin/auth-rt" 2>/dev/null; then
|
||||||
|
chmod +x "$HOME/.local/bin/auth-rt"
|
||||||
|
echo "auth-rt installed (downloaded)"
|
||||||
|
else
|
||||||
|
echo "Download failed, building from source..."
|
||||||
|
_SRC="$HOME/.local/share/auth-runtime"
|
||||||
|
if [ -d "$_SRC/.git" ]; then git -C "$_SRC" pull --ff-only
|
||||||
|
else git clone --depth 1 "$_FORGEJO/agent-skills/auth-runtime.git" "$_SRC"
|
||||||
|
fi
|
||||||
|
bash "$_SRC/install.sh"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Installing video-product-snapshot skill..."
|
# Check required system dependencies
|
||||||
|
|
||||||
# Check dependencies
|
|
||||||
for cmd in ffmpeg ffprobe bun; do
|
for cmd in ffmpeg ffprobe bun; do
|
||||||
if ! command -v "$cmd" &>/dev/null; then
|
if ! command -v "$cmd" &>/dev/null; then
|
||||||
echo "ERROR: '$cmd' not found in PATH. Please install it first." >&2
|
echo "ERROR: '$cmd' not found in PATH. Please install it first." >&2
|
||||||
|
|
@ -13,12 +31,8 @@ for cmd in ffmpeg ffprobe bun; do
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# Install npm dependencies
|
|
||||||
cd "$SKILL_DIR"
|
|
||||||
bun install
|
bun install
|
||||||
|
|
||||||
# Build dist
|
|
||||||
bun run build
|
bun run build
|
||||||
|
|
||||||
echo "Done. Run with: bun dist/run.js <command> [args]"
|
echo "Done. Run with: bun dist/run.js <command> [args]"
|
||||||
echo "Requires: ANTHROPIC_API_KEY env var for product detection."
|
echo "Copy .env.example to .env and fill in VISION_API_KEY."
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue