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."
6
6
7
7
# Set up .netrc file with GitHub credentials
8
8
git_setup () {
9
- cat << - EOF > $HOME /.netrc
9
+ cat << -EOF >$HOME /.netrc
10
10
machine github.com
11
11
login $GITHUB_ACTOR
12
12
password $GITHUB_TOKEN
@@ -16,16 +16,13 @@ git_setup() {
16
16
password $GITHUB_TOKEN
17
17
EOF
18
18
chmod 600 $HOME /.netrc
19
-
20
19
git config --global user.email " $INPUT_AUTHOR_EMAIL "
21
20
git config --global user.name " $INPUT_AUTHOR_NAME "
22
21
}
23
22
24
23
add () {
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
29
26
}
30
27
31
28
# This is needed to make the check work for untracked files
34
31
35
32
echo " Checking for uncommitted changes in the git working tree..."
36
33
# 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
39
35
git_setup
40
36
41
- git fetch
37
+ git fetch
42
38
43
39
# 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
46
41
echo " Creating branch..."
47
42
git branch " ${GITHUB_REF: 11} "
48
43
fi
You can’t perform that action at this time.
0 commit comments