Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does this insert variables that don't exist, or only update? #1

Open
SoylentGraham opened this issue Oct 8, 2020 · 2 comments
Open
Assignees

Comments

@SoylentGraham
Copy link

I could look through the code, but this information is missing from the readme, and would be good to know :)

Somtimes its useful to throw if it doesn't exist, sometimes useful to insert new data :)

@jossef
Copy link
Owner

jossef commented Oct 9, 2020

Hey @SoylentGraham

does an upsert (create or update) the given key
also supports multiple levels

I can add an optional parameter to give more control (default shall be validateExists: false)

- name: Update my-file.json description
  uses: jossef/action-set-json-field@v1
  with:
    file: my-file.json
    field: description
    value: my custom data
    validateExists: true

@SoylentGraham
Copy link
Author

SoylentGraham commented Oct 9, 2020 via email

@jossef jossef self-assigned this Oct 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants