fjogeleit / yaml-update-action

Update YAML property with dynamic values

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

creating unwanted quote

maxisam opened this issue · comments

somehow it creates quote around 'on'. But it works fine for another path like "$.resources[(@.length)]"

This one works totally fine.

image

 changes: |
            {
              ".github/workflows/worker-production-build.yml":{
                "$.on.workflow_dispatch.inputs.project.options[(@.length)]": "${{ env.PROJ_PATH }}"
              }
            }

I figured out. I need noCompatMode: true

https://github.com/nodeca/js-yaml/blob/0d3ca7a27b03a6c974790a30a89e456007d62976/test/issues/0266.js#L16

Should we just set it as true? or create an option for it?

It's fine for me to just enable it. Do you want to open a PR?

@maxisam I had to add an input for it because of first issues in existing workflows. You can just enabled it with noCompatMode set to true