File tree Expand file tree Collapse file tree 1 file changed +6
-11
lines changed
Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ echo "Running in $PWD."
66
77# Set up .netrc file with GitHub credentials
88git_setup () {
9- cat << - EOF > $HOME /.netrc
9+ cat << -EOF >$HOME /.netrc
1010 machine github.com
1111 login $GITHUB_ACTOR
1212 password $GITHUB_TOKEN
@@ -16,16 +16,13 @@ git_setup() {
1616 password $GITHUB_TOKEN
1717EOF
1818 chmod 600 $HOME /.netrc
19-
2019 git config --global user.email " $INPUT_AUTHOR_EMAIL "
2120 git config --global user.name " $INPUT_AUTHOR_NAME "
2221}
2322
2423add () {
25- if $INPUT_FORCE
26- then find $INPUT_PATH -name " $INPUT_PATTERN " | while read x; do git add -f $x ; done
27- else find $INPUT_PATH -name " $INPUT_PATTERN " | while read x; do git add $x ; done
28- fi
24+ if $INPUT_FORCE ; then f=-f; fi
25+ find $INPUT_PATH -name " $INPUT_PATTERN " | while read x; do git add $f $x ; done
2926}
3027
3128# This is needed to make the check work for untracked files
3431
3532echo " Checking for uncommitted changes in the git working tree..."
3633# This section only runs if there have been file changes
37- if ! git diff --cached --exit-code
38- then
34+ if ! git diff --cached --exit-code; then
3935 git_setup
4036
41- git fetch
37+ git fetch
4238
4339 # Verify if the branch needs to be created
44- if ! git rev-parse --verify --quiet " ${GITHUB_REF: 11} "
45- then
40+ if ! git rev-parse --verify --quiet " ${GITHUB_REF: 11} " ; then
4641 echo " Creating branch..."
4742 git branch " ${GITHUB_REF: 11} "
4843 fi
You can’t perform that action at this time.
0 commit comments