Skip to content

Commit b31554f

Browse files
authored
ci: add autofix workflow (#419)
1 parent c3f678b commit b31554f

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

.github/workflows/autofix.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: autofix.ci # For security reasons, the workflow in which the autofix.ci action is used must be named "autofix.ci".
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- synchronize
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
autofix:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout Repo
18+
uses: actions/checkout@v4
19+
20+
- name: Setup Node.js LTS
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: lts/*
24+
cache: yarn
25+
26+
- name: Install dependencies
27+
run: yarn --immutable
28+
29+
- name: Format Codes
30+
run: yarn format
31+
32+
- name: Apply autofix.ci
33+
uses: autofix-ci/action@v1
34+
with:
35+
fail-fast: false

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
"build:r": "r -f cjs",
5555
"build:ts": "tsc -b",
5656
"eslint": "ESLINT_USE_FLAT_CONFIG=false eslint",
57+
"format": "prettier --write .",
5758
"lint": "run-p 'lint:*'",
5859
"lint:es": "eslint . --cache",
5960
"lint:tsc": "tsc -b --noEmit",

0 commit comments

Comments
 (0)