10000 next try · shiftcode/github-action-skip@ee05ae7 · GitHub
[go: up one dir, main page]

Skip to content

Commit ee05ae7

Browse files
next try
1 parent 05e3247 commit ee05ae7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/main.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@ async function run() {
1010
console.log(`skip CI on commit message ${skipOnCommitMsg}`)
1111

1212
console.log(JSON.stringify(git.context))
13-
14-
core.setFailed('skip CI')
13+
const commitMessage = git.context.payload.head_commit.message
14+
if (commitMessage.includes(skipOnCommitMsg)) {
15+
core.setFailed(`stopping here, because the commit message contains the provided input <${skipOnCommitMsg}>`)
16+
}
1517
} catch (error) {
1618
core.setFailed(error.message)
1719
}

0 commit comments

Comments
 (0)
0