YAMLLint, yamlfmt, and auto-formatting

pull/388/head
Wyatt Stanke 11 months ago
parent 3dc8a4f444
commit aa8bd44c6d
No known key found for this signature in database
GPG Key ID: CE6BA5FFF135536D

@ -4,7 +4,22 @@ name: Lint
on: [push, pull_request] # yamllint disable-line rule:truthy
jobs:
yaml-fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- uses: actions/setup-go@v4
- run: go install github.com/google/yamlfmt/cmd/yamlfmt@latest
- run: yamlfmt .
- uses: EndBug/add-and-commit@v9
with:
message: "yamllint: auto-format"
default_author: github_actions
yaml-lint:
needs: yaml-fmt
runs-on: ubuntu-latest
steps:
- name: Check out source repository

@ -0,0 +1,4 @@
formatter:
type: basic
include_document_start: true
max_line_length: 127

@ -0,0 +1,9 @@
---
extends: default
rules:
line-length:
max: 127
truthy:
# GitHub Actions
check-keys: false
Loading…
Cancel
Save