2021-07-15 23:44:50 +00:00
|
|
|
name: Test Yq Action
|
|
|
|
on: [push]
|
2022-04-09 04:55:43 +00:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2021-07-15 23:44:50 +00:00
|
|
|
jobs:
|
|
|
|
|
|
|
|
build:
|
|
|
|
name: Build
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2022-03-10 02:43:36 +00:00
|
|
|
- uses: actions/checkout@v3
|
2021-07-15 23:44:50 +00:00
|
|
|
- name: Get test
|
2022-10-17 04:27:24 +00:00
|
|
|
id: get_value
|
2021-07-15 23:44:50 +00:00
|
|
|
uses: mikefarah/yq@master
|
|
|
|
with:
|
2022-10-18 23:59:09 +00:00
|
|
|
cmd: yq '.test' examples/multiline-text.yaml
|
|
|
|
- name: Multiline test
|
2022-10-17 04:27:24 +00:00
|
|
|
run: echo "### It was [${{ steps.get_value.outputs.result }}]" >> $GITHUB_STEP_SUMMARY
|
2021-07-15 23:44:50 +00:00
|
|
|
- name: Write inplace test
|
|
|
|
id: lookupSdkVersion
|
|
|
|
uses: mikefarah/yq@master
|
|
|
|
with:
|
2022-10-17 04:27:24 +00:00
|
|
|
cmd: yq -i '.b.c = 5' examples/sample.yaml
|