Simple YAML Linter/Validator Workflow for GitHub Actions

codewithcaen

CodeWithCaen

Posted on June 23, 2024

Simple YAML Linter/Validator Workflow for GitHub Actions

Here's a quick tip if you work with YAML on GitHub!

The GitHub Actions Ubuntu runners comes with yamllint installed, meaning it's super simple to create linting/validating workflows to ensure your YAML is valid!

name: Validate YAML

on:
  push:
  pull_request:

jobs:
  validate-yaml:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Validate YAML file
        run: yamllint my-file.yml
Enter fullscreen mode Exit fullscreen mode
💖 💪 🙅 🚩
codewithcaen
CodeWithCaen

Posted on June 23, 2024

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related