This repository has been archived on 2024-07-30. You can view files and clone it, but cannot push or open issues or pull requests.
Auto-Homelab/.forgejo/workflows/yamllint.yml

30 lines
628 B
YAML
Raw Normal View History

2024-05-27 19:27:46 -04:00
name: Lint on PR
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
2024-05-27 20:06:42 -04:00
lint:
name: Lint YAML files
runs-on: ubuntu-latest
2024-05-27 19:27:46 -04:00
steps:
- name: Checkout code
uses: actions/checkout@v4
2024-05-27 19:27:46 -04:00
2024-05-27 20:06:42 -04:00
- name: Install Node.js
2024-05-27 20:00:19 -04:00
uses: actions/setup-node@v4
2024-05-27 20:06:42 -04:00
with:
node-version: 14
2024-05-27 19:27:46 -04:00
- name: Install yamllint
2024-05-27 20:08:04 -04:00
run: |
npm install -g yamllint
2024-05-27 20:06:42 -04:00
2024-05-27 19:27:46 -04:00
- name: Show yamllint version
2024-05-27 20:08:04 -04:00
run: |
yamllint --version
2024-05-27 20:06:42 -04:00
2024-05-27 19:27:46 -04:00
- name: Lint .yml files
2024-05-27 20:08:04 -04:00
run: |
yamllint -d "{extends: relaxed, rules: {line-length: {max: 120}}}" ./**/*.yml