File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ Add a step like this to your workflow:
2626- ` author_name` : the name of the user that will be displayed as the author of the commit
2727- `author_email` : the email of the user that will be displayed as the author of the commit
2828- `message` : the message for the commit
29- - `path` : the path to stage files from
29+ - `path` : the path(s) to stage files from
3030
3131# ## Environment variables:
3232
Original file line number Diff line number Diff line change 22set -eu
33
44# Set up .netrc file with GitHub credentials
5- git_setup ( ) {
5+ git_setup ( ) {
66 cat << - EOF > $HOME /.netrc
77 machine github.com
88 login $GITHUB_ACTOR
1818 git config --global user.name " Add & Commit GitHub Action"
1919}
2020
21+ add () {
22+ find $INPUT_PATH -name " *.*" | while read x; do git add $x ; done
23+ }
24+
2125# This is needed to make the check work for untracked files
2226echo " Staging files in commit path..."
23- git add " ${INPUT_PATH} "
27+ add
2428
2529echo " Checking for uncommitted changes in the git working tree..."
2630# This section only runs if there have been file changes
3640 git checkout " ${GITHUB_REF: 11} "
3741
3842 echo " Adding files..."
39- git add " ${INPUT_PATH} "
43+ add
4044
4145 echo " Creating commit..."
4246 git commit -m " $INPUT_MESSAGE " --author=" $INPUT_AUTHOR_NAME <$INPUT_AUTHOR_EMAIL >"
You can’t perform that action at this time.
0 commit comments