RoadieHQ / backstage-entity-validator

Validate properties and well known annotations in your Backstage catalog-info.yaml files.
https://roadie.io
68 stars 14 forks source link

Add support for validating multiple files in GitHub Actions #16

Closed stefanbuck closed 3 years ago

stefanbuck commented 3 years ago

As outlined in #15, it is not possible to validate multiple files using the GitHub Action. This Pull Requests add support for the following scenarios

Validate multiple files separated by comma

Actions do not support arrays, only string values see. This is a workaround to support multiple files passed in from a single input.

- uses:  RoadieHQ/backstage-entity-validator@v0.3.0
  with:
    path: 'catalog-info-1.yaml,catalog-info-2.yaml,catalog-info-3.yaml'

Validate multiple files using a glob

Using a glob allows you to define a pattern and expand the input. In the example below, all files matching this pattern will be returns.

- uses:  RoadieHQ/backstage-entity-validator@v0.3.0
  with:
    path: 'catalog-info-*.yaml,services/**/*/catalog-info.yaml'

General globbing support

Even the terminal expands glob patterns, in certain situations this does not work e.g. when passing a list of files using STDIN. With this change globs are supported in scenarios.

Xantier commented 3 years ago

Thank you @stefanbuck!

This ended up being a smaller change than I was anticipating. Thanks so much for taking this onto your plate and delivering. I'll merge this in and release a new GHA out of this.

stefanbuck commented 3 years ago

This ended up being a smaller change than I was anticipating.

Yeah, same here ... 😄