File tree Expand file tree Collapse file tree 2 files changed +51
-0
lines changed Expand file tree Collapse file tree 2 files changed +51
-0
lines changed Original file line number Diff line number Diff line change
1
+ import { syncfromGithubAction } from 'monorepo-sync' ;
2
+
3
+ syncfromGithubAction ( )
4
+ . then ( ( ) => {
5
+ console . log ( 'Sync completed successfully' ) ;
6
+ process . exit ( 0 ) ;
7
+ } )
8
+ . catch ( ( error ) => {
9
+ console . error ( 'Error during sync:' , error ) ;
10
+ process . exit ( 1 ) ;
11
+ } ) ;
Original file line number Diff line number Diff line change
1
+ name : Sync Merged PR to Monorepo
2
+
3
+ on :
4
+ pull_request :
5
+ types : [closed]
6
+ branches :
7
+ - main
8
+ - master
9
+
10
+ jobs :
11
+ sync-to-monorepo :
12
+ if : github.event.pull_request.merged == true
13
+ runs-on : ubuntu-latest
14
+
15
+ steps :
16
+ - name : Checkout repository
17
+ uses : actions/checkout@v4
18
+ with :
19
+ fetch-depth : 0
20
+
21
+ - name : Setup Node.js
22
+ uses : actions/setup-node@v4
23
+ with :
24
+ node-version : ' 18'
25
+
26
+ - name : Install dependencies
27
+ # Install project dependencies (including dev dependencies)
28
+ run : npm install
29
+
30
+ - name : Sync to Monorepo
31
+ env :
32
+ GH_TOKEN : ${{ secrets.MONOREPO_SYNC_TOKEN }}
33
+ PR_NUMBER : ${{ github.event.pull_request.number }}
34
+ PR_TITLE : ${{ github.event.pull_request.title }}
35
+ PR_AUTHOR : ${{ github.event.pull_request.user.login }}
36
+ SOURCE_REPO_NAME : ${{ github.event.repository.name }}
37
+ MONOREPO_PACKAGE_LOCATION : apps/formio-server
38
+ run : |
39
+ echo "Syncing PR #${PR_NUMBER}: ${PR_TITLE}"
40
+ node .github/workflows/sync-monorepo.mjs
You can’t perform that action at this time.
0 commit comments