From 4c2b97fa1d6f772645b82a11ffd862da978df31a Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Mon, 3 Jun 2024 17:59:18 -0400 Subject: [PATCH] Support installing through a custom GitHub Action Signed-off-by: Juan Cruz Viotti --- README.markdown | 14 ++++++++++++++ action.yml | 10 ++++++++++ 2 files changed, 24 insertions(+) create mode 100644 action.yml diff --git a/README.markdown b/README.markdown index fb035370..25330b04 100644 --- a/README.markdown +++ b/README.markdown @@ -38,6 +38,20 @@ powerful [JSON Toolkit](https://github.com/sourcemeta/jsontoolkit) library. brew install intelligence-ai/apps/jsonschema ``` +### From GitHub Actions + +```yaml +- uses: intelligence-ai/jsonschema@vX.Y.Z +``` + +Where `X.Y.Z` is replaced with the desired version. For example: + +```yaml +- uses: intelligence-ai/jsonschema@v0.1.1 +# Then use as usual +- run: jsonschema fmt path/to/schemas --check +``` + ### Using the install script helper ```sh diff --git a/action.yml b/action.yml new file mode 100644 index 00000000..236279c7 --- /dev/null +++ b/action.yml @@ -0,0 +1,10 @@ +name: JSON Schema CLI +description: Install the JSON Schema CLI +runs: + using: composite + steps: + # TODO: Install from the latest tag at or before the current commit sha + - name: Install the JSON Schema CLI (latest) + shell: bash + run: | + /bin/sh -c "$(curl -fsSL https://raw.githubusercontent.com/intelligence-ai/jsonschema/main/install -H 'Cache-Control: no-cache, no-store, must-revalidate')"