11name : Check PR Katacoda Syntax
2-
2+ env :
3+ PR_NUMBER : ${{github.event.number}}
34on :
45 pull_request_target :
56 branches : [ main ]
67jobs :
78 setup-matrix :
89 runs-on : ubuntu-latest
9- env :
10- PR_NUMBER : ${{github.event.number}}
1110
1211 steps :
1312 - name : Checkout playbooks
1817 run : npm install
1918 - name : Select Changed Files
2019 id : changedfiles
21- run : |
22- node selectChangedFiles.js
20+ run : node selectChangedFiles.js
21+ - name : Get branch
22+ id : get_branch
23+ run : node getHeadRef.js
2324 - name : Setup matrix combinations
2425 id : setup-matrix-combinations
2526 run : |
3435 echo ::set-output name=matrix-combinations::{\"include\":[$MATRIX_PARAMS_COMBINATIONS]}
3536 outputs :
3637 matrix-combinations : ${{ steps.setup-matrix-combinations.outputs.matrix-combinations }}
38+ head_ref : ${{ steps.get_branch.outputs.head_ref}}
3739
3840 build :
3941 runs-on : ubuntu-latest
@@ -45,31 +47,24 @@ jobs:
4547 uses : actions/checkout@v2
4648 with :
4749 repository : devonfw-tutorials/tutorial-compiler
48-
4950 - name : Checkout playbooks
5051 uses : actions/checkout@v2
5152 with :
5253 repository : devonfw-tutorials/tutorials
54+ ref : ${{needs.setup-matrix.outputs.head_ref}}
5355 path : playbooks
54-
5556 - uses : actions/setup-node@v2-beta
56-
5757 - name : install TS
5858 run : npm install typescript
59-
6059 - name : npm install
6160 run : npm install
62-
63- - name : run buildRun.sh --user ${{ github.actor }} --branch ${{ github.event.pull_request_target.head.ref }} --checkSyntax
64- run : |
65- sh buildRun.sh --user ${{ github.actor }} --branch ${{ github.event.pull_request_target.head.ref }} --checkSyntax -p ${{ matrix.tutorial }} -e test_console
66-
61+ - name : run buildRun.sh --user ${{ github.actor }} --branch ${{needs.setup-matrix.outputs.head_ref}} --checkSyntax
62+ run : sh buildRun.sh --user ${{ github.actor }} --branch ${{needs.setup-matrix.outputs.head_ref}} --checkSyntax -p ${{ matrix.tutorial }} -e test_console
6763 - name : Check error file existence
6864 id : check_files
6965 uses : andstor/file-existence-action@v1
7066 with :
7167 files : " ./build/errors/syntaxErrors.md"
72-
7368 - name : Get message
7469 id : get_message
7570 if : steps.check_files.outputs.files_exists == 'true'
@@ -80,11 +75,10 @@ jobs:
8075 message="${message//$'\r'/'%0D'}"
8176 echo "${message}"
8277 echo "::set-output name=message::$message"
83-
8478 - name : Request changes
8579 if : ${{ steps.get_message.outputs.message != '' }}
8680 uses : andrewmusgrave/automatic-pull-request-review@0.0.2
8781 with :
8882 repo-token : ' ${{ secrets.GITHUB_TOKEN }}'
8983 event : COMMENT
90- body : ${{ steps.get_message.outputs.message }}
84+ body : ${{ steps.get_message.outputs.message }}
0 commit comments