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