drone-yaml/_index.md
Robert Kaussow 0e0c92cdb2 commit dbfd835b5b
Author: Robert Kaussow <mail@thegeeklab.de>
Date:   Sun Sep 19 14:09:12 2021 +0200

    fix typos and adjust dictionary
2021-09-19 12:13:41 +00:00

1.9 KiB

title
drone-yaml

Build Status Docker Hub Quay.io GitHub contributors Source: GitHub License: MIT

Custom linter and formatter for the Drone YAML configuration file format.

{{< toc >}}

Build

Build the binary with the following command:

export GOOS=linux
export GOARCH=amd64
export CGO_ENABLED=0
export GO111MODULE=on

go build -v -a -tags netgo -o release/linux/amd64/drone-yaml

Build the Docker image with the following command:

docker build --file docker/Dockerfile.amd64 --tag thegeeklab/drone-yaml .

Usage

{{< hint warning >}} Note
Be aware that the tool only supports configuration files for the Drone Docker runner! {{< /hint >}}

Lint the YAML file:

drone-yaml lint samples/simple.yml

Format the YAML file:

# default is printing to stdout
drone-yaml fmt samples/simple.yml

# optionally update the formatted file in place
drone-yaml fmt samples/simple.yml --save