Skip to content

RomanosTrechlis/actions-validate-yaml

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

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub actions Validate YAML

Validate YAML files with a JSON schema. Using validate-yaml

GitHub actions configuration

In order to use RomanosTrechlis/actions-validate-yaml, follow the instructions bellow:

  1. Create the .github/workflows directory in your root directory
  2. Create a yml file with an appropriate name
  3. Copy the following script into that file
  4. Change input variables
  5. Commit and push
on:
  push:
    paths:
      - '**.yml'
      - '**.yaml'
release:
  types: [created]

name: Validate YAML
jobs:
  releases-matrix:
    name: Validate YAML
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: RomanosTrechlis/actions-validate-yaml@master
        with:
          schema: spec.json
          data: |-
            file1.yml
            file2.yml

Input variables

There are two input for this action:

  1. schema: is the schema specification in .json or .yaml file
  2. data: a string of multiple files to validate separated by new line