GrantBirki / json-yaml-validate

A GitHub Action to quickly validate JSON and YAML files in a repository
MIT License
28 stars 11 forks source link

Bug: Wrong file extension in summary and double check of same file #70

Open jprecuch opened 2 months ago

jprecuch commented 2 months ago

I'm using following configuration

      - name: Validate json ${{ inputs.json_configuration }} with schema
        uses: GrantBirki/json-yaml-validate@3a3d883daf915618a7503a2e9c04b8e57130a4b8 # v3.0.0
        with:
          use_gitignore: false
          files: |
            moonstone-configuration.json
            manifests-configuration.yaml
          json_schema: moonstone-schema.json

When the action passes it prints following summary

Run GrantBirki/json-yaml-validate@3a3d883daf915618a7503a2e9c04b8e57130a4b8
moonstone-configuration.json is valid
moonstone-configuration.json is valid
configuration.yaml is valid
✅ all 1 detected JSON files are valid
✅ all 2 detected YAML files are valid

There seems to be two issues:

  1. It counted 3 files to be validated (why?), when I have only 2 in my "files". Based on info it checked same file twice?
  2. It considers one of .json files to be YAML format for no reason or somewhere got additional yaml file to report
GrantBirki commented 2 months ago

I pushed a fix in a new release v3.2.1. Can you let me know if it is working better now? If not, please re-open this issue and tag me. Thanks! 🙇

jprecuch commented 2 months ago

@GrantBirki it seems it does not work. Still the same issue and information in messages. I have no perms to reopen, only comment

Run GrantBirki/json-yaml-validate@e42e6ece9b97f2b220274c909a9a98e380c2c9fd
/usr/bin/docker exec  df01493bb90a69d31f15dbf64b90d6e4a30d035372ceecb15cdc8929c3bc3654 sh -c "cat /etc/*release | grep ^ID"
moonstone-configuration.json is valid
moonstone-configuration.json is valid
manifests-configuration.yaml is valid
✅ all 1 detected JSON files are valid
✅ all 2 detected YAML files are valid