Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4dc03b4

Browse files
authored
Merge pull request #12 from xtqqczze/long-options
style: use long options for command line arguments
2 parents ea776c0 + 8e0cb64 commit 4dc03b4

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

entrypoint.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ fi
1010
if [[ ! -z "$SSH_PRIVATE_KEY" ]]; then
1111
echo "Saving SSH_PRIVATE_KEY"
1212

13-
mkdir -p /root/.ssh
13+
mkdir --parents /root/.ssh
1414
echo "$SSH_PRIVATE_KEY" > /root/.ssh/id_rsa
1515
chmod 600 /root/.ssh/id_rsa
1616

1717
# Github action changes $HOME to /github at runtime
1818
# therefore we always copy the SSH key to $HOME (aka. ~)
19-
mkdir -p ~/.ssh
19+
mkdir --parents ~/.ssh
2020
cp /root/.ssh/* ~/.ssh/ 2> /dev/null || true
2121
fi
2222

github-sync.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ echo "BRANCHES=$BRANCH_MAPPING"
2727
git remote set-url origin "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY"
2828
git remote add tmp_upstream "$UPSTREAM_REPO"
2929
git fetch tmp_upstream
30-
git remote -v
31-
git push origin "refs/remotes/tmp_upstream/${BRANCH_MAPPING%%:*}:refs/heads/${BRANCH_MAPPING#*:}" -f
30+
git remote --verbose
31+
git push origin "refs/remotes/tmp_upstream/${BRANCH_MAPPING%%:*}:refs/heads/${BRANCH_MAPPING#*:}" --force
3232
git remote rm tmp_upstream
33-
git remote -v
33+
git remote --verbose

0 commit comments

Comments
 (0)