mirror of https://github.com/docker/buildx.git
ci: add yamllint
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
parent
0d37d68efd
commit
c46193baba
|
@ -1,7 +1,6 @@
|
|||
|
||||
# Add 'area/project' label to changes in basic project documentation and .github folder, excluding .github/workflows
|
||||
area/project:
|
||||
- all:
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- .github/**
|
||||
|
|
|
@ -31,7 +31,7 @@ group "default" {
|
|||
}
|
||||
|
||||
group "validate" {
|
||||
targets = ["lint", "lint-gopls", "validate-golangci", "validate-vendor", "validate-docs"]
|
||||
targets = ["lint", "lint-gopls", "lint-yaml", "validate-golangci", "validate-vendor", "validate-docs"]
|
||||
}
|
||||
|
||||
target "lint" {
|
||||
|
@ -64,6 +64,14 @@ target "lint-gopls" {
|
|||
target = "gopls-analyze"
|
||||
}
|
||||
|
||||
target "lint-yaml" {
|
||||
description = "Lint Github Actions workflows and other YAML files"
|
||||
inherits = ["_common"]
|
||||
dockerfile = "./hack/dockerfiles/lint.Dockerfile"
|
||||
target = "yamllint"
|
||||
output = ["type=cacheonly"]
|
||||
}
|
||||
|
||||
target "validate-vendor" {
|
||||
inherits = ["_common"]
|
||||
dockerfile = "./hack/dockerfiles/vendor.Dockerfile"
|
||||
|
|
|
@ -75,4 +75,10 @@ RUN --mount=target=. \
|
|||
done
|
||||
EOF
|
||||
|
||||
FROM alpine AS yamllint
|
||||
RUN apk add --no-cache yamllint
|
||||
WORKDIR /go/src/github.com/docker/buildx
|
||||
RUN --mount=type=bind \
|
||||
yamllint -c .yamllint.yml --strict .
|
||||
|
||||
FROM lint
|
Loading…
Reference in New Issue