mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-15 13:03:46 +00:00
ci: add skill generator workflow and scripts
This commit is contained in:
parent
58deb2c8ed
commit
27e93fcfa0
3 changed files with 428 additions and 0 deletions
48
.github/workflows/skill-generator.yml
vendored
Normal file
48
.github/workflows/skill-generator.yml
vendored
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
name: sync-sandbox-agent-skill
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
generate:
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
|
||||
- name: Generate skill artifacts
|
||||
run: node scripts/skill-generator/generate.js
|
||||
|
||||
- name: Sync to skills repo
|
||||
env:
|
||||
SKILLS_REPO_TOKEN: ${{ secrets.SKILLS_REPO_TOKEN }}
|
||||
run: |
|
||||
if [ -z "$SKILLS_REPO_TOKEN" ]; then
|
||||
echo "SKILLS_REPO_TOKEN is not set" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
git config --global user.name "github-actions[bot]"
|
||||
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||
|
||||
git clone "https://x-access-token:${SKILLS_REPO_TOKEN}@github.com/rivet-dev/skills.git" /tmp/rivet-skills
|
||||
|
||||
mkdir -p /tmp/rivet-skills/skills/sandbox-agent
|
||||
rm -rf /tmp/rivet-skills/skills/sandbox-agent/*
|
||||
cp -R scripts/skill-generator/dist/* /tmp/rivet-skills/skills/sandbox-agent/
|
||||
|
||||
cd /tmp/rivet-skills
|
||||
git add skills/sandbox-agent
|
||||
|
||||
if git diff --cached --quiet; then
|
||||
echo "No skill changes to publish"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
git commit -m "chore: update sandbox-agent skill"
|
||||
git push
|
||||
Loading…
Add table
Add a link
Reference in a new issue