Skip to content

Commit 445a3fe

Browse files
committed
Do not immediately run action if required by another
1 parent bbc8d2b commit 445a3fe

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/index.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ async function run() {
2525
});
2626
}
2727

28-
run().catch((e) => {
29-
core.setFailed(e);
30-
});
28+
// Do not run if this node module is required by another action such as
29+
// run-tests.
30+
if (!(require.main === module)) {
31+
run().catch((e) => {
32+
core.setFailed(e);
33+
});
34+
}

0 commit comments

Comments
 (0)