-
Notifications
You must be signed in to change notification settings - Fork 126
88 lines (76 loc) · 2.5 KB
/
sync-derived-branches.yml
File metadata and controls
88 lines (76 loc) · 2.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
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