-
Notifications
You must be signed in to change notification settings - Fork 9
47 lines (41 loc) · 1.09 KB
/
format.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: format
on:
pull_request:
push:
branches:
- main
jobs:
formatter:
name: formatter
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version-file: go.mod
- uses: actions/setup-node@v4
with:
node-version-file: frontend/.node-version
cache: "npm"
cache-dependency-path: frontend/package-lock.json
- name: Install packages
run: npm ci
working-directory: ./frontend
- name: format
run: npm run format
working-directory: ./frontend
- name: Install packages
run: npm ci
working-directory: ./hack
- name: format
run: npm run format
working-directory: ./hack
- name: Install goimports
run: go install golang.org/x/tools/cmd/goimports@latest
- name: Format code
run: go mod tidy && goimports -w .
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Apply php-cs-fixer changes