Skip to content

Commit d6db92c

Browse files
authored
feat: add schema sync workflow for makim-lsp (#204)
1 parent 3a7b2c9 commit d6db92c

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

.github/workflows/lsp.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Sync schema.json to LSP repo
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- "src/makim/schema.json"
8+
9+
jobs:
10+
sync-schema:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout Makim repo
14+
uses: actions/checkout@v4
15+
16+
- name: Set up Git
17+
run: |
18+
git config --global user.name "github-actions[bot]"
19+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
20+
21+
- name: Clone LSP repo
22+
run: |
23+
git clone https://github.com/makim-org/makim-lsp.git
24+
cd makim-lsp
25+
git checkout -b sync-schema-$(date +%s)
26+
27+
cp ./src/makim/schema.json ./packages/language-server/src/schema/makim.schema.json
28+
29+
git add .
30+
git commit -m "chore(schema): sync from Makim"
31+
32+
git push origin main
33+
34+
echo "${{ secrets.GH_TOKEN }}" > token.txt
35+
36+
gh auth login --with-token < token.txt
37+
gh pr create \
38+
--body "This PR was automatically generated by a GitHub Action to sync `schema.json` from the Makim repo." \
39+
--title "Sync schema.json from Makim" \
40+
--head "main" \
41+
--base "main"

0 commit comments

Comments
 (0)