-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: CrazyMax <[email protected]>
- Loading branch information
Showing
7 changed files
with
77 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: validate | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- 'master' | ||
tags: | ||
- 'v*' | ||
pull_request: | ||
branches: | ||
- 'master' | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
target: | ||
- lint | ||
- shellcheck | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v2 | ||
- | ||
name: Run | ||
uses: docker/bake-action@v1 | ||
with: | ||
targets: ${{ matrix.target }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,18 @@ | ||
# syntax=docker/dockerfile:1.3 | ||
|
||
ARG GO_VERSION=1.13.15 | ||
ARG GOLANGCI_LINTER_SHA="v1.21.0" | ||
ARG GOLANGCI_LINT_VERSION=v1.21.0 | ||
|
||
FROM golang:${GO_VERSION}-alpine AS build | ||
ENV CGO_ENABLED=0 | ||
RUN apk add --no-cache git | ||
ARG GOLANGCI_LINTER_SHA | ||
ARG GO111MODULE=on | ||
RUN --mount=type=cache,target=/root/.cache/go-build \ | ||
--mount=type=cache,target=/go/pkg/mod \ | ||
go get github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCI_LINTER_SHA} | ||
|
||
FROM golang:${GO_VERSION}-alpine AS lint | ||
ENV CGO_ENABLED=0 | ||
ENV DISABLE_WARN_OUTSIDE_CONTAINER=1 | ||
COPY --from=build /go/bin/golangci-lint /usr/local/bin | ||
FROM golang:${GO_VERSION}-alpine AS base | ||
WORKDIR /go/src/github.com/docker/cli | ||
ENV GOGC=75 | ||
ENTRYPOINT ["/usr/local/bin/golangci-lint"] | ||
CMD ["run", "--config=.golangci.yml"] | ||
COPY . . | ||
|
||
FROM golangci/golangci-lint:${GOLANGCI_LINT_VERSION}-alpine AS golangci-lint | ||
|
||
FROM base AS lint | ||
ENV CGO_ENABLED=0 | ||
ENV GOGC=75 | ||
RUN --mount=type=bind,target=. \ | ||
--mount=type=cache,target=/root/.cache/go-build \ | ||
--mount=type=cache,target=/root/.cache/golangci-lint \ | ||
--mount=from=golangci-lint,source=/usr/bin/golangci-lint,target=/usr/bin/golangci-lint \ | ||
golangci-lint run --config .golangci.yml ./... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
FROM koalaman/shellcheck-alpine:v0.7.1 | ||
RUN apk add --no-cache bash make | ||
# syntax=docker/dockerfile:1.3 | ||
|
||
FROM koalaman/shellcheck-alpine:v0.7.1 AS base | ||
RUN apk add --no-cache bash | ||
WORKDIR /go/src/github.com/docker/cli | ||
ENV DISABLE_WARN_OUTSIDE_CONTAINER=1 | ||
COPY . . | ||
|
||
FROM base AS shellcheck | ||
RUN --mount=type=bind,target=. \ | ||
shellcheck contrib/completion/bash/docker \ | ||
&& find scripts/ -type f | grep -v scripts/winresources | grep -v '.*.ps1' | xargs shellcheck |
This file was deleted.
Oops, something went wrong.