2bb6445e56
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
44 lines
608 B
CUE
44 lines
608 B
CUE
package lua
|
|
|
|
import (
|
|
"dagger.io/dagger"
|
|
"universe.dagger.io/docker"
|
|
)
|
|
|
|
// Checks lua format via Stylua
|
|
#StyluaCheck: {
|
|
// Files to Copy
|
|
source: dagger.#FS
|
|
|
|
// Any extra formatting args
|
|
extraArgs: [...string]
|
|
|
|
_run: docker.#Build & {
|
|
steps: [
|
|
docker.#Pull & {
|
|
source: "rust:latest"
|
|
},
|
|
|
|
docker.#Run & {
|
|
command: {
|
|
name: "cargo"
|
|
args: ["install", "stylua"]
|
|
}
|
|
},
|
|
|
|
docker.#Copy & {
|
|
dest: "/tmp"
|
|
contents: source
|
|
},
|
|
|
|
docker.#Run & {
|
|
command: {
|
|
name: "stylua"
|
|
args: ["--check", "."] + extraArgs
|
|
}
|
|
workdir: "/tmp"
|
|
},
|
|
]
|
|
}
|
|
}
|