ci: move ci infra top-level

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
Andrea Luzzardi
2022-04-04 17:40:16 -07:00
parent 50b36a50aa
commit 93d2224073
10 changed files with 9 additions and 20 deletions

View File

@@ -0,0 +1,34 @@
package shellcheck
import (
"dagger.io/dagger"
"universe.dagger.io/docker"
)
#Lint: {
// Source code
source: dagger.#FS
// shellcheck version
version: *"0.8.0" | string
_image: docker.#Pull & {
source: "koalaman/shellcheck-alpine:v\(version)"
}
container: docker.#Run & {
input: _image.output
mounts: "source": {
dest: "/src"
contents: source
}
workdir: "/src"
command: {
name: "sh"
args: ["-c", #"""
shellcheck $(find . -type f \( -iname \*.bats -o -iname \*.bash -o -iname \*.sh \) -not -path "*/node_modules/*" -not -path "*/bats-*/*")
"""#]
}
}
}