Skip to content

Astro.jsを作成したものに変更 #14

Astro.jsを作成したものに変更

Astro.jsを作成したものに変更 #14

Workflow file for this run

name: Lint Project
on:
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Install Node.js
uses: actions/[email protected]
with:
node-version: 20
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Install packages
run: pnpm install
- name: Format
run: pnpm run format
- name: Determine the branch name
id: get_branch
run: echo "branch=$(echo ${GITHUB_HEAD_REF})" >> $GITHUB_OUTPUT
- name: Commit Format
run: |
git add -N . # 新規ファイルを含める
if ! git diff --exit-code --quiet
then
git config user.name github-actions
git config user.email [email protected]
git add .
git commit -m "chore: fix format."
git push origin HEAD:${{ steps.get_branch.outputs.branch }}
fi
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
- name: Exec Lint
run: pnpm run lint