Skip to content

Commit fc08618

Browse files
Merge pull request #140 from MarcelDiessner/feature/syntaxChecking
hotfix syntaxChecking
2 parents e8a2135 + fb816a9 commit fc08618

2 files changed

Lines changed: 14 additions & 10 deletions

File tree

.github/workflows/syntaxCheckPullRequest.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ jobs:
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: |
@@ -35,7 +35,8 @@ jobs:
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
@@ -50,7 +51,8 @@ jobs:
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

getHeadRef.js renamed to getPlaybookCheckout.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const core = require("@actions/core");
22
const { Octokit } = require("@octokit/core");
33
const 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
});

0 commit comments

Comments
 (0)