-
-
Notifications
You must be signed in to change notification settings - Fork 4
86 lines (75 loc) · 2.42 KB
/
lint.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: Lint & format
on:
push:
branches-ignore: [dev, main, renovate/*]
workflow_dispatch:
jobs:
lintformat:
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
FORCE_COLOR: true
HUSKY: 0
# GITHUB_TOKEN: ${{ secrets.GH_ACT_PAT }}
name: 'Lint & format'
runs-on: ubuntu-latest
steps:
# Setup steps
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
ref: ${{ github.head_ref }}
- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@01dd5d3ca463c7f10f7f4f7b4f177225ac661ee4 # v6
with:
gpg_private_key: ${{ secrets.BOT_GPG_KEY }}
git_user_signingkey: true
git_config_global: true
git_commit_gpgsign: true
- uses: pnpm/action-setup@d882d12c64e032187b2edb46d3a0d003b7a43598 # v2.4.0
name: Install pnpm
id: pnpm-install
with:
run_install: false
# standalone: true
- name: Install Node.js
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4
with:
node-version-file: .nvmrc
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
- name: Install dependencies
run: pnpm install
# Linting & Formatting
- name: Lint workspace
run: pnpm lint:pkg
if: always()
id: workspace-lint
- name: Lint projects
run: pnpm lint:fix -- --format github
if: always()
id: lint
env:
ESLINT_APP_ID: ${{ secrets.BOT_APP_ID }}
ESLINT_PRIVATE_KEY_BASE64: ${{ secrets.BOT_SECRET_KEY_B64 }}
- name: Format projects
run: pnpm format --force
if: always()
id: format
# - name: Check Types
# run: pnpm types:check
# if: always()
# id: typecheck
# Commit changes
- name: Commit changed files
uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5 # v9
if: always()
with:
message: 'chore: lint & format'
commit: --signoff --no-verify
committer_name: InReach [bot]
committer_email: [email protected]
author_name: InReach [bot]
author_email: [email protected]
pull: '--rebase --autostash'