Skip to content

Commit 5061047

Browse files
authored
Merge pull request #318 from manNomi/chroe/bruno-api-ts-sync
chore : bruno-api-sync 연결 위한 깃허브액션 워크플로우 추가
2 parents 933b216 + eebf4ec commit 5061047

1 file changed

Lines changed: 50 additions & 0 deletions

File tree

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Sync from Bruno
2+
3+
on:
4+
repository_dispatch:
5+
types: [bruno_updated]
6+
7+
jobs:
8+
sync:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
13+
- name: Generate App Token
14+
id: app-token
15+
uses: actions/create-github-app-token@v1
16+
with:
17+
app-id: ${{ secrets.APP_ID }}
18+
private-key: ${{ secrets.APP_PRIVATE_KEY }}
19+
owner: ${{ github.repository_owner }}
20+
21+
- name: Clone Bruno Repo
22+
run: |
23+
git clone https://x-access-token:${{ steps.app-token.outputs.token }}@github.com/${{ github.repository_owner }}/api-docs.git /tmp/bruno
24+
25+
- uses: actions/setup-node@v4
26+
with:
27+
node-version: "18"
28+
29+
- name: Install Dependencies
30+
run: npm install
31+
32+
- name: Generate Hooks
33+
run: |
34+
npx bruno-api-typescript generate-hooks -i /tmp/bruno -o ./src/apis
35+
36+
- name: Create PR
37+
uses: peter-evans/create-pull-request@v8
38+
with:
39+
token: ${{ steps.app-token.outputs.token }}
40+
commit-message: "chore: sync API from Bruno"
41+
branch: api-sync-${{ github.run_number }}
42+
title: "🔄 API Sync from Bruno"
43+
body: |
44+
## Bruno API 자동 동기화
45+
46+
Bruno 저장소가 업데이트되어 자동으로 hooks를 생성했습니다.
47+
48+
**변경사항**:
49+
- React Query hooks 업데이트
50+
- TypeScript 타입 업데이트

0 commit comments

Comments
 (0)