File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -18,13 +18,18 @@ runs:
18
18
env :
19
19
INPUT_BOT : " ${{ inputs.bot }}"
20
20
INPUT_NAME : " ${{ inputs.name || inputs.bot }}"
21
+ INPUT_GLOBAL : " ${{ inputs.global }}"
21
22
SCRIPT : " ${{ github.action_path }}/set_bot_user.sh"
22
23
run : |
23
24
set -euo pipefail
24
25
path="https://api.github.com/users/${INPUT_BOT}%5Bbot%5D"
25
26
user_id="$(curl -sS "${path}" | jq -r .id)"
27
+ args=()
28
+ if [[ "${INPUT_GLOBAL}" =~ (true|1) ]]; then
29
+ args+=("--global")
30
+ fi
26
31
set -x
27
- git config ${{ inputs.global && "--global" || "" }} \
32
+ git config "${args[@]}" \
28
33
user.name "${INPUT_NAME}"
29
- git config ${{ inputs.global && "--global" || "" }} \
34
+ git config "${args[@]}" \
30
35
user.email "${user_id}+${INPUT_BOT}[bot]@users.noreply.github.com"
You can’t perform that action at this time.
0 commit comments