yq/.github/workflows/test-yq.yml

28 lines
626 B
YAML
Raw Normal View History

2021-07-15 23:44:50 +00:00
name: Test Yq Action
2022-10-19 01:04:52 +00:00
on:
push:
workflow_dispatch:
permissions:
contents: read
2021-07-15 23:44:50 +00:00
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
2021-07-15 23:44:50 +00:00
- name: Get test
2022-10-17 04:27:24 +00:00
id: get_value
2022-10-19 01:04:52 +00:00
uses: mikefarah/yq@master
2021-07-15 23:44:50 +00:00
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
2022-10-19 01:04:52 +00:00
uses: mikefarah/yq@master
2021-07-15 23:44:50 +00:00
with:
2022-10-17 04:27:24 +00:00
cmd: yq -i '.b.c = 5' examples/sample.yaml