Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions .github/workflows/lint-yaml.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Generated by Gabo (https://github.com/ashishb/gabo)
---
# Run this locally with act - https://github.com/nektos/act
# act -j lintYaml
name: Lint YAML

on: # yamllint disable-line rule:truthy
push:
branches: [main, master]
paths:
- '**.yml'
- '**.yaml'
- '.github/workflows/**.yml'
- '.github/workflows/**.yaml'
pull_request:
branches: [main, master]
paths:
- "**.yml"
- "**.yaml"
- ".github/workflows/**.yml"
- ".github/workflows/**.yaml"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

# Ref: https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/controlling-permissions-for-github_token
permissions:
contents: read

jobs:
lintYaml:
runs-on: ubuntu-latest
timeout-minutes: 15

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Check YAML files with linter
uses: ibiqlik/action-yamllint@v3
with:
# All files under base dir
file_or_dir: "."
config_data: |
extends: default
yaml-files:
- '*.yaml'
- '*.yml'
rules:
document-start:
level: warning
line-length:
level: warning
new-line-at-end-of-file:
level: warning
trailing-spaces:
level: warning

- name: Lint GitHub Actions
uses: reviewdog/action-actionlint@v1