Skip to content

Commit

Permalink
add scope
Browse files Browse the repository at this point in the history
  • Loading branch information
peaceiris committed Apr 23, 2022
1 parent 1b18dfb commit 9454d6c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions setup-git/action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: "Setup Git"
description: "A composite action to setup Git config"
inputs:
scope:
description: "Set a scope --global or --local"
default: "--local"
required: false
user_name:
description: "Set a user name"
default: "github-actions[bot]"
Expand All @@ -20,5 +24,5 @@ runs:
shell: "bash"
working-directory: "${{ inputs.working_directory }}"
run: |
git config user.name "${{ inputs.user_name }}"
git config user.email "${{ inputs.user_email }}"
git config "${{ inputs.scope }}" user.name "${{ inputs.user_name }}"
git config "${{ inputs.scope }}" user.email "${{ inputs.user_email }}"

0 comments on commit 9454d6c

Please sign in to comment.