the other one

This commit is contained in:
ITOH
2021-05-21 17:50:55 +02:00
parent 571017e39d
commit fe4ab8517b

View File

@@ -1,21 +1,25 @@
name: Prettier
on: [push, pull_request]
jobs:
format:
prettier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- uses: actions/setup-node@v1
with:
node-version: "12.x"
- name: Format
run: |
npm ci
npm run format
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4.1.2
with:
commit_message: Apply formatting changes
branch: ${{ github.head_ref }}
- name: Checkout
uses: actions/checkout@v2
with:
# Make sure the actual branch is checked out when running on pull requests
ref: ${{ github.head_ref }}
# This is important to fetch the changes to the previous commit
fetch-depth: 0
- name: Prettify code
uses: creyD/prettier_action@v3.3
with:
# This part is also where you can pass other options, for example:
prettier_options: --write **/*
only_changed: False
env:
GITHUB_TOKEN: ${{ github.token }}