Skip to content

Commit 23bc292

Browse files
authored
Merge pull request #90 from arman1371/feat/add-working-directory
feat: add `working_directory` input
2 parents 1f11eb2 + ee70294 commit 23bc292

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ jobs:
6767
| Name | Description | Default |
6868
| ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------- |
6969
| `github_token` | Token for the repo. Can be passed in using `${{ secrets.GITHUB_TOKEN }}`. Required if `push: true` | - |
70+
| `working_directory` | Change to this directory before running | repo root directory |
7071
| `dry_run` | Run without creating commit, output to stdout | false |
7172
| `repository` | Repository name to push. Default or empty value represents current github repository | current one |
7273
| `branch` | Destination branch to push changes | Same as the one executing the action by default |

action.yml

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ outputs:
1010
version:
1111
description: 'New version'
1212
inputs:
13+
working_directory:
14+
description: 'Change to this directory before running'
15+
required: false
1316
dry_run:
1417
description: 'Run without creating commit, output to stdout'
1518
required: false

entrypoint.sh

+4
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ echo "${PIP_CMD[@]}"
3434
"${PIP_CMD[@]}"
3535
echo "Commitizen version: $(cz version)"
3636

37+
if [[ $INPUT_WORKING_DIRECTORY ]]; then
38+
cd $INPUT_WORKING_DIRECTORY
39+
fi
40+
3741
PREV_REV="$(cz version --project)"
3842
echo "PREVIOUS_REVISION=${PREV_REV}" >>"$GITHUB_ENV"
3943

0 commit comments

Comments
 (0)