# Validating Github Actions Workflow files in Jetbrains IDEs

If you maintain projects on [Github](https://github.com), you must have come across [Github Actions](https://github.com/features/actions) - which is Github's own CI provider where you can greate workflow files in `.github/workflow/<xyz>.yml` and get Github to build your project, run lint, test PRs, deploy to releases etc.

I use Github Actions extensively, mainly for my opensource projects as Github gives you unlimited free tier build minutes for OSS repos. And I prefer having a full end-to-end CI setup on my projects so it makes it easier for me to review and merge PRs.

Anyway, one problem I used to face is absence of validation of the `workflow.yml` files when working on IDEs. Visual Studio code does seem to have some plugins which can validate Github Workflow files, but on Jetbrains IDEs (IntelliJ IDEA, Webstorm, GoLand etc) there isn't something like that.

But [SchemaStore](https://github.com/SchemaStore/schemastore) does have JSON Schema definitions for Github Actions. Which we can use to validate our workflow files. Here's how-

## Add JSON Schema for Github Workflow in IDE Settings

Go here in Preferences

* Preferences
    
    * Languages & Frameworks
        
        * JSON Schema Mappings
            

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1672135302794/c7ef58f2-98d5-4630-95a7-1a012905d891.png align="center")

Add a new JSON Schema Mapping.

Give it a name, like `github-workflow`

Add this as the path to the JSON Schema `https://json.schemastore.org/github-workflow.json` (you can click the 🌍 globe icon and search "Github Workflow" in the SchemaStore list too).

Now we need to add a file pattern, to tell the IDE which files to be validated with this JSON Schema. Add this file pattern

`.github/workflows/*.yml`

And voila.... schema validation shoud start working

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1672135503643/306f6d8c-0a1d-4c37-8eaa-335706d3301d.png align="center")

You'll also get auto-complete and descriptions of the keys when you edit Github Workflow files now.
