Skip to content

Commit 4809a88

Browse files
committed
Skip checks on PR branches.
1 parent ec22a30 commit 4809a88

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ async function runAction() {
1414
}
1515

1616
// https://docs.github.com/en/actions/learn-github-actions/contexts#example-contents-of-the-github-contex
17+
if (!github.context.payload.ref) {
18+
core.info('Brand is not part of repository, skipping check.');
19+
return;
20+
}
1721
const currentRef = github.context.payload.ref.replace(/^refs\/heads\//, '');
1822
const workflowTarget = github.context.workflow;
1923
core.info(`Branch Ref: ${currentRef}, Workflow: ${workflowTarget}`);

0 commit comments

Comments
 (0)