Skip to content

Commit 5bce93f

Browse files
committed
ci: add autofix workflow
1 parent a9beb9b commit 5bce93f

File tree

3 files changed

+38
-1
lines changed

3 files changed

+38
-1
lines changed

.github/workflows/autofix.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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+
- reopened
8+
- synchronize
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
autofix:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout Repo
19+
uses: actions/checkout@v4
20+
21+
- name: Setup Node.js LTS
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: lts/*
25+
cache: yarn
26+
27+
- name: Install dependencies
28+
run: yarn --immutable
29+
30+
- name: Format Codes
31+
run: yarn format
32+
33+
- name: Apply autofix.ci
34+
uses: autofix-ci/action@v1
35+
with:
36+
fail-fast: false

.simple-git-hooks.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export { default } from "@1stg/simple-git-hooks";
1+
export { default } from '@1stg/simple-git-hooks'

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"scripts": {
3434
"build": "tsc -p src",
3535
"clean": "rimraf lib",
36+
"format": "prettier --write .",
3637
"lint": "run-p 'lint:*'",
3738
"lint:docs": "yarn update:eslint-docs --check",
3839
"lint:es": "eslint . --cache",

0 commit comments

Comments
 (0)