mirror of
https://github.com/aljazceru/claude-code-viewer.git
synced 2025-12-27 18:24:23 +01:00
ci: add setup-git action for configuring Git in workflows
This commit is contained in:
23
.github/actions/setup-git/action.yml
vendored
Normal file
23
.github/actions/setup-git/action.yml
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
name: "Setup Git"
|
||||
description: "Setup git config for commit and push on actions"
|
||||
|
||||
inputs:
|
||||
github_token:
|
||||
description: "The GitHub token to use"
|
||||
required: true
|
||||
origin:
|
||||
description: "The origin to use"
|
||||
required: true
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Set up Git
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ inputs.github_token }}
|
||||
shell: bash
|
||||
run: |
|
||||
git config --local user.email "$(git --no-pager log --format=format:'%ae' -n 1)"
|
||||
git config --local user.name "$(git --no-pager log --format=format:'%an' -n 1)"
|
||||
git config --local url."https://oauth2:${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/"
|
||||
git pull --rebase origin ${{ inputs.origin }}
|
||||
Reference in New Issue
Block a user