From 9fd467590fac3d719a1a24ef88d2c4f51f73b0a7 Mon Sep 17 00:00:00 2001 From: Mike Farah Date: Sun, 25 Jul 2021 10:51:13 +1000 Subject: [PATCH] Add github action docs to readme --- README.md | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 604b1a6d..f1f6e5c4 100644 --- a/README.md +++ b/README.md @@ -147,6 +147,16 @@ RUN apk add bash USER yq ``` +### GitHub Action +``` + - name: Set foobar to cool + uses: mikefarah/yq@master + with: + cmd: yq eval -i '.foo.bar = "cool"' 'config.yml' +``` + +See https://mikefarah.gitbook.io/yq/usage/github-action for more. + ### Go Get: ``` GO111MODULE=on go get github.com/mikefarah/yq/v4 @@ -250,13 +260,6 @@ Flags: Use "yq [command] --help" for more information about a command. ``` - -Simple Example: - -```bash -yq e '.a.b | length' f1.yml f2.yml -``` - ## Known Issues / Missing Features - `yq` attempts to preserve comment positions and whitespace as much as possible, but it does not handle all scenarios (see https://github.com/go-yaml/yaml/tree/v3 for details) - Powershell has its own...opinions: https://mikefarah.gitbook.io/yq/usage/tips-and-tricks#quotes-in-windows-powershell