Skip to content

Merge pull request #546 from TencentCloudBase/automation/attribution-… #63

Merge pull request #546 from TencentCloudBase/automation/attribution-…

Merge pull request #546 from TencentCloudBase/automation/attribution-… #63

name: Sync Derived Branches
on:
push:
branches: [main]
paths:
- 'config/source/guideline/**'
- 'config/source/skills/**'
- 'scripts/build-allinone-skill.ts'
- 'scripts/sync-codebuddy-plugin.ts'
workflow_dispatch:
permissions:
contents: write
jobs:
sync-allinone:
name: Sync chore/all_in_one_skill
runs-on: ubuntu-latest
steps:
- name: Checkout chore/all_in_one_skill
uses: actions/checkout@v4
with:
ref: chore/all_in_one_skill
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
- name: Reset onto main
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git fetch origin main
git reset --hard origin/main
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Build all-in-one skill
run: npx tsx scripts/build-allinone-skill.ts --dir config/allinone
- name: Commit and push
run: |
git add config/allinone
if git diff --staged --quiet; then
echo "No changes, skipping."
else
git commit -m "chore: 🔄 sync allinone skill from main"
fi
git push --force origin chore/all_in_one_skill
sync-codebuddy:
name: Sync chore/codebuddy_plugin
needs: sync-allinone
runs-on: ubuntu-latest
steps:
- name: Checkout chore/codebuddy_plugin
uses: actions/checkout@v4
with:
ref: chore/codebuddy_plugin
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
- name: Reset onto main
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git fetch origin main
git reset --hard origin/main
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Sync codebuddy plugin
run: npx tsx scripts/sync-codebuddy-plugin.ts
- name: Commit and push
run: |
git add config/codebuddy-plugin/skills config/codebuddy-plugin/rules config/codebuddy-plugin/.codebuddy-plugin
if git diff --staged --quiet; then
echo "No changes, skipping."
else
git commit -m "chore: 🔄 sync codebuddy plugin from main"
fi
git push --force origin chore/codebuddy_plugin