actions-marketplace-validations/GitHub Change Json

Github action which lets you to change a value from a json file (e.g. package.json).

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Stale
License
None
namedescriptionrequireddefault
pathPath to the JSON file you want to updateyes
keyKey to modify (supports dot notation for nested keys, e.g. "compilerOptions.target". Numeric segments are array indices, e.g. "items.0.name")no
valueValue to set for the keyno
typeType of the value: string (default), number, boolean, or jsonnostring
commitBoolean flag to commit and push the changes to the repositorynofalse
signoffAdd Signed-off-by trailer to the commit message (for DCO compliance)nofalse
deleteDelete the specified key instead of setting a valuenofalse
mergeDeep merge a JSON object into the existing value instead of replacing itnofalse
dry-runPreview changes without modifying the filenofalse
create-if-missingCreate the file with an empty JSON object if it does not existnofalse
changesJSON array of changes to apply. Each item: {"key": "...", "value": "...", "type": "...", "delete": true/false, "merge": true/false}. Overrides key/value/type/delete/merge inputs.no
schemaPath or URL to a JSON Schema file to validate the result against. Validation runs before writing.no
namedescription
old-valueThe previous value of the modified key (string for single key, JSON object for multiple keys)
new-valueThe new value that was set (string for single key, JSON object for multiple keys)
modifiedWhether the file content was actually changed ('true' or 'false')