Skip to content

Commit 7a2f36c

Browse files
committed
Add lint job to run on PRs
Signed-off-by: Jamo Luhrsen <jluhrsen@gmail.com>
1 parent 7a97731 commit 7a2f36c

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

.github/workflows/lint.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
workflow_dispatch:
11+
12+
jobs:
13+
lint:
14+
name: Lint
15+
runs-on: ubuntu-24.04
16+
steps:
17+
- name: Check out code
18+
uses: actions/checkout@v4
19+
20+
- name: Run lint
21+
run: make lint

hack/lint.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ if [ "$#" -ne 1 ]; then
1010
fi
1111
fi
1212

13+
# Create cache directory if it doesn't exist
14+
mkdir -p ${HOME}/.cache/golangci-lint
15+
1316
$1 run --security-opt label=disable --rm \
1417
-v "${HOME}"/.cache/golangci-lint:/cache -e GOLANGCI_LINT_CACHE=/cache \
1518
-v "$(pwd)":/app -w /app -e GO111MODULE=on docker.io/golangci/golangci-lint:"${VERSION}" \

0 commit comments

Comments
 (0)