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:
26
26
- ` author_name` : the name of the user that will be displayed as the author of the commit
27
27
- `author_email` : the email of the user that will be displayed as the author of the commit
28
28
- `message` : the message for the commit
29
- - `path` : the path to stage files from
29
+ - `path` : the path(s) to stage files from
30
30
31
31
# ## Environment variables:
32
32
Original file line number Diff line number Diff line change 2
2
set -eu
3
3
4
4
# Set up .netrc file with GitHub credentials
5
- git_setup ( ) {
5
+ git_setup ( ) {
6
6
cat << - EOF > $HOME /.netrc
7
7
machine github.com
8
8
login $GITHUB_ACTOR
18
18
git config --global user.name " Add & Commit GitHub Action"
19
19
}
20
20
21
+ add () {
22
+ find $INPUT_PATH -name " *.*" | while read x; do git add $x ; done
23
+ }
24
+
21
25
# This is needed to make the check work for untracked files
22
26
echo " Staging files in commit path..."
23
- git add " ${INPUT_PATH} "
27
+ add
24
28
25
29
echo " Checking for uncommitted changes in the git working tree..."
26
30
# This section only runs if there have been file changes
36
40
git checkout " ${GITHUB_REF: 11} "
37
41
38
42
echo " Adding files..."
39
- git add " ${INPUT_PATH} "
43
+ add
40
44
41
45
echo " Creating commit..."
42
46
git commit -m " $INPUT_MESSAGE " --author=" $INPUT_AUTHOR_NAME <$INPUT_AUTHOR_EMAIL >"
You can’t perform that action at this time.
0 commit comments