document
This commit is contained in:
parent
c9f74f6081
commit
14d1980003
10
README.md
10
README.md
|
@ -107,3 +107,13 @@ Make sure you use the `actions/checkout@v2` action!
|
|||
with:
|
||||
commit-message: 'CI: bumps version to {{version}} [skip ci]'
|
||||
```
|
||||
|
||||
**push:** Set false you want to avoid pushing the new version tag/package.json. Example:
|
||||
```yaml
|
||||
- name: 'Automated Version Bump'
|
||||
uses: 'phips28/gh-action-bump-version@master'
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
push: false
|
||||
```
|
||||
|
|
6
index.js
6
index.js
|
@ -105,8 +105,10 @@ Toolkit.run(async (tools) => {
|
|||
return;
|
||||
}
|
||||
|
||||
// case: if user sets push == false
|
||||
if ( process.env['INPUT_PUSH'] === "false" ) {
|
||||
// case: if user sets push to false, to skip pushing new tag/package.json
|
||||
const push = process.env['INPUT_PUSH']
|
||||
if ( push === "false" || push === false ) {
|
||||
tools.exit.success('User requested to skip pushing new tag and package.json. Finished.');
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue