Skip to content

day4追加

day4追加 #43

Workflow file for this run

on: pull_request
jobs:
format:
name: formatter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{github.event.pull_request.head.ref}}
- uses: actions/setup-node@v3
with:
node-version: "16"
- name: install formatter (prettier)
run: npm ci
- name: format
run: npm run fmt
- name: git push files
run: |
if ! git diff --exit-code --quiet
then
git config --local user.email "[email protected]"
git config --local user.name "github-actions[bot]"
git add .
git commit -m "format" -a
git pull
git push origin ${GITHUB_HEAD_REF}
fi