This repository was archived by the owner on Mar 22, 2022. It is now read-only.
File tree 3 files changed +17
-3
lines changed
3 files changed +17
-3
lines changed Original file line number Diff line number Diff line change 15
15
uses : actions/checkout@v2
16
16
17
17
- name : Lint
18
- run : make lint
18
+ run : DOCKER_BUILDKIT=1 make lint
19
19
20
20
- name : Build
21
21
run : make build
Original file line number Diff line number Diff line change 1
1
.DEFAULT_GOAL := help
2
2
3
3
PACKAGE =github.com/compose-spec/compose-ref
4
+ IMAGE_PREFIX =composespec/compose-ref-
4
5
5
6
GOFLAGS=-mod =vendor
6
7
@@ -16,9 +17,13 @@ test: ## Run tests
16
17
fmt : # # Format go files
17
18
@goimports -e -w ./
18
19
20
+ .PHONY : build-validate-image
21
+ build-validate-image :
22
+ docker build . -f ci/Dockerfile -t $(IMAGE_PREFIX ) validate
23
+
19
24
.PHONY : lint
20
- lint : # # Verify Go files
21
- golangci-lint run --config ./golangci.yml ./
25
+ lint : build-validate-image
26
+ docker run --rm $( IMAGE_PREFIX ) validate bash -c " golangci-lint run --config ./golangci.yml ./"
22
27
23
28
.PHONY : setup
24
29
setup : # # Setup the precommit hook
Original file line number Diff line number Diff line change
1
+ FROM golang:1.14
2
+
3
+ WORKDIR /go/src
4
+
5
+ ARG GOLANGCILINT_VERSION=v1.24.0
6
+ RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin ${GOLANGCILINT_VERSION}
7
+
8
+ ENV GOFLAGS=-mod=vendor
9
+ COPY . .
You can’t perform that action at this time.
0 commit comments