Skip to content

Commit

Permalink
Add no-verify option for git commits (#247)
Browse files Browse the repository at this point in the history
* Add no-verify option for git commits

* Specify specifically commit no verify
  • Loading branch information
BradyRyun authored May 13, 2024
1 parent 56588a3 commit 13a8e9d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ inputs:
description: 'Set a custom domain of the git instance'
default: 'github.com'
required: false
commit-no-verify:
description: 'Skip commit hooks'
default: 'false'
required: false
push:
description: '[DEPRECATED] Set to false to skip pushing the new tag'
default: 'true'
Expand Down
6 changes: 5 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,11 @@ const pkg = getPackageJson();
try {
// to support "actions/checkout@v1"
if (process.env['INPUT_SKIP-COMMIT'] !== 'true') {
await runInWorkspace('git', ['commit', '-a', '-m', commitMessage.replace(/{{version}}/g, newVersion)]);
if (process.env['INPUT_COMMIT-NO-VERIFY'] === 'true') {
await runInWorkspace('git', ['commit', '-a', '--no-verify', '-m', commitMessage.replace(/{{version}}/g, newVersion)]);
} else {
await runInWorkspace('git', ['commit', '-a', '-m', commitMessage.replace(/{{version}}/g, newVersion)]);
}
}
} catch (e) {
// console.warn(
Expand Down

0 comments on commit 13a8e9d

Please sign in to comment.