File tree 2 files changed +9
-0
lines changed
2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ inputs:
13
13
git-user-name :
14
14
description : Git user.name to use for the commit.
15
15
default : github-actions[bot]
16
+ pre-commit-script :
17
+ description : A command to run before committing the dependency changes (e.g. npm run build)
16
18
package-manager :
17
19
description : Set to 'yarn' to use yarn. Defaults to npm.
18
20
default : npm
24
26
- ${{ inputs.git-user-email }}
25
27
- ${{ inputs.package-manager }}
26
28
- ${{ inputs.bump-version }}
29
+ - ${{ inputs.pre-commit-script }}
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ GIT_USER_NAME=${1}
5
5
GIT_USER_EMAIL=${2}
6
6
PACKAGE_MANAGER=${3}
7
7
BUMP_VERSION=${4}
8
+ PRE_COMMIT_SCRIPT=${5}
8
9
9
10
npx npm-check-updates -u
10
11
@@ -37,6 +38,11 @@ PR_BRANCH=chore/deps-$(date +%s)
37
38
git config user.name ${GIT_USER_NAME}
38
39
git config user.email ${GIT_USER_EMAIL}
39
40
git checkout -b ${PR_BRANCH}
41
+
42
+ if [ -n " ${PRE_COMMIT_SCRIPT} " ]; then
43
+ ${PRE_COMMIT_SCRIPT}
44
+ fi
45
+
40
46
git commit -am " ${DESCRIPTION} "
41
47
git push origin ${PR_BRANCH}
42
48
You can’t perform that action at this time.
0 commit comments