File tree Expand file tree Collapse file tree 3 files changed +28
-8
lines changed
Expand file tree Collapse file tree 3 files changed +28
-8
lines changed Original file line number Diff line number Diff line change 33on :
44 pull_request :
55 branches : [ master ]
6-
76jobs :
87 build :
98 runs-on : ubuntu-latest
1514 uses : actions/setup-node@v2.1.2
1615 with :
1716 node-version : 10.x
17+
18+ - name : GitHub context (actor and head ref)
19+ run : |
20+ echo ${{ github.actor }}
21+ echo ${{ github.head_ref }}
1822
1923 - name : Install NPM modules
2024 run : npm ci
2731 automerge :
2832 runs-on : ubuntu-latest
2933 needs : build
30- if : ${{ github.actor == 'AzureSDKAutomation' && startsWith(github.head_ref, 'sdkAuto/') }}
34+ env :
35+ PR_PREFIX : sdkAuto/
36+ if : ${{ github.actor == 'openapi-sdkautomation[bot]' }}
3137 steps :
3238 - uses : actions/checkout@v2
3339
4349 - name : Check RP in Autogenlist
4450 run : |
4551 check_result='';
46- exec=$(npm run find-basepath ${{ github.head_ref }});
52+ exec=$(npm run find-basepath ${{ github.head_ref }} $PR_PREFIX );
4753 while read line;
4854 do
4955 # overriding check_result until the last line is read, last line contains
Original file line number Diff line number Diff line change @@ -9,7 +9,8 @@ executeSynchronous(async () => {
99 }
1010
1111 const prName = process . argv [ 2 ] ;
12- let basePath = prName . replace ( "sdkAutomation/" , "" ) ;
12+ const prPrefix = process . argv [ 3 ] ;
13+ let basePath = prName . replace ( prPrefix , "" ) ;
1314
1415 // format basePath
1516 basePath = `${ basePath } /resource-manager` ;
Original file line number Diff line number Diff line change 11const basePath = process . argv [ 2 ] ;
2- require ( "child_process" ) . execSync ( `npm install --prefix generator` , { stdio : 'inherit' } ) ;
3- require ( "child_process" ) . execSync ( `npm run postprocessor ${ basePath } --prefix generator` , { stdio : 'inherit' } ) ;
4- require ( "child_process" ) . execSync ( `npm install --prefix tools` , { stdio : 'inherit' } ) ;
5- require ( "child_process" ) . execSync ( `npm run test --prefix tools` , { stdio : 'inherit' } ) ;
2+ require ( "child_process" ) . execSync ( `npm install --prefix generator` , {
3+ stdio : "inherit" ,
4+ } ) ;
5+ require ( "child_process" ) . execSync (
6+ `npm run postprocessor ${ basePath } --prefix generator` ,
7+ { stdio : "inherit" }
8+ ) ;
9+ try {
10+ require ( "child_process" ) . execSync ( `npm install --prefix tools` , {
11+ stdio : "inherit" ,
12+ } ) ;
13+ require ( "child_process" ) . execSync ( `npm run test --prefix tools` , {
14+ stdio : "inherit" ,
15+ } ) ;
16+ } catch ( e ) {
17+ console . error ( e ) ;
18+ }
You can’t perform that action at this time.
0 commit comments