File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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 타입 업데이트
You can’t perform that action at this time.
0 commit comments