File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818 - name : Select Changed Files
1919 id : changedfiles
2020 run : node selectChangedFiles.js
21- - name : Get branch
22- id : get_branch
23- run : node getHeadRef .js
21+ - name : Get Playbook Checkout
22+ id : get_checkout
23+ run : node getPlaybookCheckout .js
2424 - name : Setup matrix combinations
2525 id : setup-matrix-combinations
2626 run : |
3535 echo ::set-output name=matrix-combinations::{\"include\":[$MATRIX_PARAMS_COMBINATIONS]}
3636 outputs :
3737 matrix-combinations : ${{ steps.setup-matrix-combinations.outputs.matrix-combinations }}
38- head_ref : ${{ steps.get_branch.outputs.head_ref}}
38+ checkout_ref : ${{ steps.get_branch.outputs.ref}}
39+ checkout_name : ${{ steps.get_branch.outputs.name}}
3940
4041 build :
4142 runs-on : ubuntu-latest
5051 - name : Checkout playbooks
5152 uses : actions/checkout@v2
5253 with :
53- ref : ${{needs.setup-matrix.outputs.head_ref}}
54+ repository : ${{needs.setup-matrix.output.checkout_name}}/tutorials
55+ ref : ${{needs.setup-matrix.outputs.checkout_ref}}
5456 path : playbooks
5557 - uses : actions/setup-node@v2-beta
5658 - name : install TS
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ const core = require("@actions/core");
22const { Octokit } = require ( "@octokit/core" ) ;
33const octokit = new Octokit ( { auth : process . env . GITHUB_TOKEN } ) ;
44
5- async function getHeadRef ( ) {
5+ async function getPlaybookCheckout ( ) {
66 let pr = process . env . PR_NUMBER ;
77 let ref = "" ;
88 try {
@@ -11,15 +11,17 @@ async function getHeadRef() {
1111 repo : 'tutorials' ,
1212 pull_number : pr
1313 } ) ;
14- ref = get . data . head . ref ;
14+ head = get . data . head ;
1515 } catch ( e ) {
1616 throw e ;
1717 }
18- core . info ( `Head Ref: ${ ref } ` ) ;
19- core . setOutput ( 'head_ref' , ref ) ;
18+ core . info ( `ref: ${ head . ref } ` ) ;
19+ core . setOutput ( 'ref' , head . ref ) ;
20+ core . info ( `name : ${ head . ref } ` ) ;
21+ core . setOutput ( 'name' , head . ref ) ;
2022}
2123
22- getHeadRef ( ) . catch ( err => {
24+ getPlaybookCheckout ( ) . catch ( err => {
2325 console . log ( err ) ;
2426 process . exit ( 1 ) ;
2527} ) ;
You can’t perform that action at this time.
0 commit comments