Skip to content

Commit dd4e342

Browse files
committed
MEDIUM: add golangci-lint to CI, use published check-commit image, Dockerfile optimized
1 parent 4f0c9f9 commit dd4e342

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

.github/workflows/main.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,25 @@ on: [ push, pull_request, workflow_dispatch ]
88
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
99
jobs:
1010
# This workflow contains a single job called "build"
11-
build:
12-
# The type of runner that the job will run on
11+
check-commit:
12+
name: check-commit
1313
runs-on: ubuntu-latest
14-
15-
# Steps represent a sequence of tasks that will be executed as part of the job
1614
steps:
1715
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
1816
- uses: actions/checkout@v2
1917
with:
2018
fetch-depth: 0
2119

2220
- name: check-commit
23-
uses: docker://aiharos/check-commit:latest
21+
uses: docker://haproxytech/check-commit:latest
22+
23+
golangci:
24+
name: lint
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v2
28+
29+
- name: golangci-lint
30+
uses: golangci/golangci-lint-action@v2
31+
with:
32+
working-directory: check-commit

check-commit/Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ ADD . /build/
44
WORKDIR /build
55
RUN go build -o check check.go
66

7-
FROM golang:alpine
7+
FROM alpine:latest
88
LABEL maintainer="mmhedhbi@haproxy.com"
9-
RUN apk add git
109
COPY --from=builder /build/check /check
1110
WORKDIR /
1211
ENTRYPOINT ["/check"]

0 commit comments

Comments
 (0)