Skip to content

Commit

Permalink
/action.sh: line 42: git: command not found (#88)
Browse files Browse the repository at this point in the history
Since 1.18, the addition of ${GITHUB_DOMAIN:-github.com} make error occurs in execution of the workflow.

I propose to modify ; ${GITHUB_DOMAIN:-github.com} to ${GITHUB_DOMAIN:-'github.com'}

Source : https://tldp.org/LDP/abs/html/parameter-substitution.html
Issue ref : #87
  • Loading branch information
Joffref committed Mar 15, 2021
1 parent df4b0e7 commit bb14c9f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions action.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,18 @@ fi

if [ -n "${GITHUB_TOKEN}" ]; then
print_info "setup with GITHUB_TOKEN"
remote_repo="https://x-access-token:${GITHUB_TOKEN}@${GITHUB_DOMAIN:-github.com}/${GITHUB_REPOSITORY}.git"
remote_repo="https://x-access-token:${GITHUB_TOKEN}@${GITHUB_DOMAIN:-'github.com'}/${GITHUB_REPOSITORY}.git"
elif [ -n "${PERSONAL_TOKEN}" ]; then
print_info "setup with PERSONAL_TOKEN"
remote_repo="https://x-access-token:${PERSONAL_TOKEN}@${GITHUB_DOMAIN:-github.com}/${GITHUB_REPOSITORY}.git"
remote_repo="https://x-access-token:${PERSONAL_TOKEN}@${GITHUB_DOMAIN:-'github.com'}/${GITHUB_REPOSITORY}.git"
fi

if ! git config --get user.name; then
git config --global user.name "${GITHUB_ACTOR}"
fi

if ! git config --get user.email; then
git config --global user.email "${GITHUB_ACTOR}@users.noreply.${GITHUB_DOMAIN:-github.com}"
git config --global user.email "${GITHUB_ACTOR}@users.noreply.${GITHUB_DOMAIN:-'github.com'}"
fi

git remote rm origin
Expand Down

0 comments on commit bb14c9f

Please sign in to comment.