File tree 5 files changed +1344
-0
lines changed
src/plugins/prisma-postgres-manager/management-api
5 files changed +1344
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Update API Types
2
+
3
+ on :
4
+ schedule :
5
+ - cron : ' 0 0 * * *' # Run at midnight UTC every day
6
+ workflow_dispatch : # Allow manual triggering
7
+
8
+ jobs :
9
+ update-api-types :
10
+ runs-on : ubuntu-latest
11
+ permissions :
12
+ contents : write # Required for committing changes
13
+ pull-requests : write # Required for creating PRs
14
+
15
+ steps :
16
+ - name : Checkout repository
17
+ uses : actions/checkout@v4
18
+
19
+ - name : Setup Node.js
20
+ uses : actions/setup-node@v4
21
+ with :
22
+ node-version : ' 20'
23
+ cache : ' npm'
24
+
25
+ - name : Install Dependencies
26
+ run : npm install && npm run bootstrap
27
+
28
+ - name : Generate API client
29
+ working-directory : packages/vscode
30
+ run : npm run generate-api-client
31
+
32
+ - name : Run linter with auto-fix
33
+ run : npm run lint
34
+
35
+ - name : Check for changes in TypeScript files
36
+ id : git-check
37
+ run : |
38
+ # Only stage .ts and .d.ts files
39
+ git add "*.ts" "*.d.ts"
40
+ if git diff --staged --quiet; then
41
+ echo "changes=false" >> $GITHUB_OUTPUT
42
+ else
43
+ echo "changes=true" >> $GITHUB_OUTPUT
44
+ fi
45
+
46
+ - name : Compile if changes exist
47
+ if : steps.git-check.outputs.changes == 'true'
48
+ run : npm run compile
49
+
50
+ - name : Commit and push if changes exist
51
+ if : steps.git-check.outputs.changes == 'true'
52
+ run : |
53
+ git commit -m "chore: update generated API types"
54
+ git push
You can’t perform that action at this time.
0 commit comments