mirror of
https://github.com/aljazceru/claude-code-viewer.git
synced 2025-12-25 01:04:21 +01:00
24 lines
724 B
YAML
24 lines
724 B
YAML
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 }}
|