Skip to content

Commit a1f9f51

Browse files
committed
Add linter job
Signed-off-by: Juan Antonio Osorio <[email protected]>
1 parent eecb80c commit a1f9f51

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

.github/workflows/build-and-publish.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,25 @@ permissions:
1717
pull-requests: read
1818

1919
jobs:
20+
lint:
21+
name: Lint Go Code
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Checkout code
25+
uses: actions/checkout@v5
26+
27+
- name: Set up Go
28+
uses: actions/setup-go@v5
29+
with:
30+
go-version-file: 'go.mod'
31+
cache: true
32+
33+
- name: Run golangci-lint
34+
uses: golangci/golangci-lint-action@v6
35+
with:
36+
version: latest
37+
args: --timeout=5m
38+
2039
validate-and-test:
2140
name: Validate and Test
2241
runs-on: ubuntu-latest
@@ -55,7 +74,7 @@ jobs:
5574
build-and-release:
5675
name: Build and Release Registry
5776
runs-on: ubuntu-latest
58-
needs: validate-and-test
77+
needs: [lint, validate-and-test]
5978
if: github.ref == 'refs/heads/main' && (github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
6079
steps:
6180
- name: Checkout code

0 commit comments

Comments
 (0)