Skip to content

Commit 782b6b1

Browse files
authored
Merge pull request #1 from EndBug/better-paths
Better paths
2 parents 0f9f6c2 + 6a097ea commit 782b6b1

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

entrypoint.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
set -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
@@ -18,9 +18,13 @@ EOF
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
2226
echo "Staging files in commit path..."
23-
git add "${INPUT_PATH}"
27+
add
2428

2529
echo "Checking for uncommitted changes in the git working tree..."
2630
# This section only runs if there have been file changes
@@ -36,7 +40,7 @@ then
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>"

0 commit comments

Comments
 (0)