iac/.forgejo/workflows/yamllint.yml

30 lines
643 B
YAML
Raw Normal View History

2024-12-12 23:50:46 -05:00
name: Lint on PR
2024-07-12 23:57:29 -04:00
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
lint:
name: Lint YAML files
runs-on: docker
2024-12-11 00:24:37 -05:00
container:
2024-12-11 20:25:08 -05:00
image: mafyuh/node-yamllint:v1.0.0
2024-07-12 23:57:29 -04:00
steps:
- name: Checkout code
uses: actions/checkout@v4
2024-12-12 23:44:09 -05:00
2024-12-12 23:50:46 -05:00
- name: Show yamllint version
run: |
yamllint --version
2024-07-12 23:57:29 -04:00
2024-12-12 23:50:46 -05:00
- name: Lint .yml files
run: |
2024-12-13 00:40:01 -05:00
lint_output=$(find docker -name "*.yml" yamllint -d "{extends: relaxed, rules: {line-length: {max: 120}}}" {} \;)
if [[ -n "$lint_output" ]]; then
echo "$lint_output"
exit 1
fi