ci: add setup-git action for configuring Git in workflows

This commit is contained in:
d-kimsuon
2025-10-18 13:56:58 +09:00
parent 99eeb1c521
commit 0cd26a5ed5
4 changed files with 48 additions and 15 deletions

View File

@@ -35,14 +35,10 @@ jobs:
pnpm exec playwright install
- name: Set up Git
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
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 ${{ github.head_ref }}
uses: ./.github/actions/setup-git
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
origin: ${{ github.head_ref }}
- name: Build project
run: pnpm build