diff --git a/.github/actions/push/action.yml b/.github/actions/push/action.yml index 8acb5c78..da2b7dbd 100644 --- a/.github/actions/push/action.yml +++ b/.github/actions/push/action.yml @@ -29,16 +29,12 @@ runs: run: | git config --global user.name "${{ inputs.user }}" git config --global user.email "${{ inputs.user }}@users.noreply.github.com" - env: - SSH_AUTH_SOCK: /tmp/ssh_agent.sock shell: bash - name: Git Commit if: ${{ inputs.message != '' }} run: | git add . git commit -m "${{ inputs.message }}" - env: - SSH_AUTH_SOCK: /tmp/ssh_agent.sock shell: bash - name: Push Changes run: | @@ -46,6 +42,4 @@ runs: if [ ${{ inputs.tags }} = 'true' ]; then git push --tags fi - env: - SSH_AUTH_SOCK: /tmp/ssh_agent.sock shell: bash diff --git a/.github/actions/ssh/action.yml b/.github/actions/ssh/action.yml index 70626bd4..c4806a24 100644 --- a/.github/actions/ssh/action.yml +++ b/.github/actions/ssh/action.yml @@ -1,5 +1,5 @@ -name: 'SSH' -description: 'Setup ssh key.' +name: 'Git SSH' +description: 'Setup ssh key for github.' branding: icon: key @@ -9,6 +9,10 @@ inputs: ssh-key: description: 'SSH key' required: true + user: + description: 'Git user name' + required: false + default: 'github-actions[bot]' runs: using: "composite" @@ -24,3 +28,8 @@ runs: ssh-agent -a $SSH_AUTH_SOCK > /dev/null ssh-add /home/runner/.ssh/github_actions shell: bash + - name: Setup Git User + run: | + git config --global user.name "${{ inputs.user }}" + git config --global user.email "${{ inputs.user }}@users.noreply.github.com" + shell: bash