Skip to content

Commit 100833c

Browse files
committed
Use hk in GitHub Actions
This configures the "Lint" workflow to use `hk` instead of calling the linters manually.
1 parent aed3cf1 commit 100833c

File tree

1 file changed

+7
-66
lines changed

1 file changed

+7
-66
lines changed

.github/workflows/lint.yml

Lines changed: 7 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ on:
44
pull_request:
55

66
jobs:
7-
prettier:
8-
name: Prettier
7+
lint:
8+
name: Lint
99
runs-on: ubuntu-latest
1010

1111
steps:
@@ -15,71 +15,12 @@ jobs:
1515
bundler-cache: true
1616
- uses: actions/setup-node@v4
1717
with:
18-
node-version-file: .tool-versions
1918
cache: yarn
20-
- run: yarn install --immutable --immutable-cache --check-cache
21-
- run: yarn prettier --check --ignore-unknown '**/*'
22-
23-
rubocop:
24-
name: Rubocop
25-
runs-on: ubuntu-latest
26-
27-
steps:
28-
- uses: actions/checkout@v4
29-
- uses: ruby/setup-ruby@v1
30-
with:
31-
bundler-cache: true
32-
- uses: actions/setup-node@v4
33-
with:
3419
node-version-file: .tool-versions
35-
cache: yarn
3620
- run: yarn install --immutable --immutable-cache --check-cache
37-
- run: bin/bundle exec rubocop
38-
39-
rufo:
40-
name: Rufo
41-
runs-on: ubuntu-latest
42-
43-
steps:
44-
- uses: actions/checkout@v4
45-
- uses: ruby/setup-ruby@v1
46-
with:
47-
bundler-cache: true
48-
- run: bin/bundle exec rufo --check app
49-
50-
brakeman:
51-
name: Brakeman
52-
runs-on: ubuntu-latest
53-
54-
steps:
55-
- uses: actions/checkout@v4
56-
- uses: ruby/setup-ruby@v1
57-
with:
58-
bundler-cache: true
59-
- run: bin/bundle exec brakeman
60-
61-
terraform-fmt:
62-
name: Terraform fmt
63-
runs-on: ubuntu-latest
64-
65-
steps:
66-
- uses: actions/checkout@v4
67-
- name: Install terraform
68-
uses: hashicorp/setup-terraform@v3
69-
with:
70-
terraform_version: 1.10.5
71-
- name: Check formatting
72-
run: terraform fmt -check -recursive
73-
74-
tflint:
75-
name: TFLint
76-
runs-on: ubuntu-latest
77-
78-
steps:
79-
- uses: actions/checkout@v4
21+
- uses: hashicorp/setup-terraform@v3
8022
- uses: terraform-linters/setup-tflint@v4
81-
- name: Run TFLint
82-
working-directory: terraform
83-
run: |
84-
tflint --init
85-
tflint --recursive
23+
- uses: jdx/mise-action@v2
24+
with:
25+
install_args: hk pkl
26+
- run: hk check

0 commit comments

Comments
 (0)