wewrite/.github/workflows/build-openclaw.yml
wangzhuc a92f96a320 ci: amend openclaw build into trigger commit instead of separate commit
Avoids extra bot commits that cause push rejections. Uses --amend
and --force-with-lease so dist/openclaw changes fold into the
original commit cleanly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 14:06:21 +08:00

42 lines
962 B
YAML

name: Build OpenClaw Skill
on:
workflow_dispatch:
push:
branches: [main]
paths:
- 'SKILL.md'
- 'references/**'
- 'scripts/**'
- 'toolkit/**'
- 'personas/**'
- 'requirements.txt'
- '*.example.yaml'
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Build OpenClaw skill
run: python3 scripts/build_openclaw.py
- name: Commit dist/openclaw if changed
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add dist/openclaw/
if git diff --cached --quiet; then
echo "No changes to commit"
else
git commit --amend --no-edit
git push --force-with-lease
fi