From 0e0c92cdb2ffbd48904b364d32cb312a2deacd47 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Sun, 19 Sep 2021 12:13:41 +0000 Subject: [PATCH] commit dbfd835b5b0ba77875d9ac74564dd782abd6d13c Author: Robert Kaussow Date: Sun Sep 19 14:09:12 2021 +0200 fix typos and adjust dictionary --- _index.md | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 _index.md diff --git a/_index.md b/_index.md new file mode 100644 index 0000000..6fc7a51 --- /dev/null +++ b/_index.md @@ -0,0 +1,60 @@ +--- +title: drone-yaml +--- + +[![Build Status](https://img.shields.io/drone/build/thegeeklab/drone-yaml?logo=drone&server=https%3A%2F%2Fdrone.thegeeklab.de)](https://drone.thegeeklab.de/thegeeklab/drone-yaml) +[![Docker Hub](https://img.shields.io/badge/dockerhub-latest-blue.svg?logo=docker&logoColor=white)](https://hub.docker.com/r/thegeeklab/drone-yaml) +[![Quay.io](https://img.shields.io/badge/quay-latest-blue.svg?logo=docker&logoColor=white)](https://quay.io/repository/thegeeklab/drone-yaml) +[![GitHub contributors](https://img.shields.io/github/contributors/thegeeklab/drone-yaml)](https://github.com/thegeeklab/drone-yaml/graphs/contributors) +[![Source: GitHub](https://img.shields.io/badge/source-github-blue.svg?logo=github&logoColor=white)](https://github.com/thegeeklab/drone-yaml) +[![License: MIT](https://img.shields.io/github/license/thegeeklab/drone-yaml)](https://github.com/thegeeklab/drone-yaml/blob/main/LICENSE) + +Custom linter and formatter for the [Drone](https://github.com/drone/drone) YAML configuration file format. + + + +{{< toc >}} + + + +## Build + +Build the binary with the following command: + +```Shell +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: + +```Shell +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: + +```Shell +drone-yaml lint samples/simple.yml +``` + +Format the YAML file: + +```Shell +# 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 +```