Skip to content

cssnr/json-key-value-check-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Tags Test Quality Gate Status GitHub Release Version GitHub Last Commit Codeberg Last Commit GitHub Top Language GitHub Org Stars Discord

JSON Key Value Check Action

Check that JSON Key's Values Match Provided Values.

Note

Please submit a Feature Request for new features or Open an Issue if you find any bugs.

Inputs

input required default description
file Yes - JSON File Path to Validate
keys Yes - Keys to Check, One per Line
values Yes - Values to Verify, One per Line
seperator No . Nested Key Seperator

For multiple keys and values use new lines with a yaml |.

Examples

- name: 'Verify JSON'
  uses: cssnr/json-key-value-check-action@v1
  with:
      file: manifest.json
      keys: version
      values: ${{ github.ref_name }}

Same as above but also setting an additional key value pair.

- name: 'Verify JSON'
  uses: cssnr/json-key-value-check-action@v1
  with:
      file: manifest.json
      keys: |
          version
          version_name
      values: |
          ${{ github.ref_name }}
          "Release ${{ github.ref_name }}"

Set a nested key and use file from different directory.

- name: 'Verify JSON'
  uses: cssnr/json-key-value-check-action@v1
  with:
      file: src/manifest.json
      keys: |
          meta.version
      values: |
          "Release ${{ github.ref_name }}"

Support

For general help or to request a feature, see:

If you are experiencing an issue/bug or getting unexpected results, you can:

Contributing

Currently, the best way to contribute to this project is to star this project on GitHub.

Additionally, you can support other GitHub Actions I have published:

For a full list of current projects to support visit: https://cssnr.github.io/

About

Check that JSON Key's Values Match Provided Values

Resources

License

Stars

Watchers

Forks

Packages

No packages published