| 1 |
name: Lint |
| 2 |
on: |
| 3 |
workflow_dispatch: |
| 4 |
push: |
| 5 |
branches: |
| 6 |
- master |
| 7 |
pull_request: |
| 8 |
|
| 9 |
permissions: |
| 10 |
contents: read |
| 11 |
|
| 12 |
jobs: |
| 13 |
markdownlint: |
| 14 |
name: Lint Markdown |
| 15 |
runs-on: ubuntu-latest |
| 16 |
steps: |
| 17 |
- name: Checkout repository |
| 18 |
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| 19 |
- name: Run Markdown linter |
| 20 |
uses: DavidAnson/markdownlint-cli2-action@21c1be1b93ad9ed58fa840aacc3f279cde2a72ff # v24.2.0 |
| 21 |
with: |
| 22 |
globs: # set to null to override default of *.{md,markdown} |
| 23 |
|
| 24 |
spellcheck: |
| 25 |
name: Check spelling |
| 26 |
runs-on: ubuntu-latest |
| 27 |
steps: |
| 28 |
- name: Checkout repository |
| 29 |
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| 30 |
- name: Check spelling with cspell |
| 31 |
uses: streetsidesoftware/cspell-action@6f3c77c1406bc930f944ba97e9801a22e42caf58 # v9.1.0 |
| 32 |
with: |
| 33 |
incremental_files_only: true |
| 34 |
strict: true |
| 35 |
# cspell uses the .cspell.json configuration file |
| 36 |
- name: Check spelling with codespell |
| 37 |
uses: codespell-project/actions-codespell@e3258cca84ce02b0bb36a3d41f2c18f719a0cc1a # v2.4.3 |
| 38 |
with: |
| 39 |
check_filenames: true |
| 40 |
check_hidden: true |
| 41 |
# codespell uses the .codespellrc file |
| 42 |
|
| 43 |
template-formatting: |
| 44 |
name: Check template formatting |
| 45 |
runs-on: ubuntu-latest |
| 46 |
steps: |
| 47 |
- name: Checkout repository |
| 48 |
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| 49 |
- name: Install Go |
| 50 |
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 |
| 51 |
with: |
| 52 |
go-version: "1.27" |
| 53 |
check-latest: true |
| 54 |
cache: true |
| 55 |
cache-dependency-path: | |
| 56 |
**/go.sum |
| 57 |
**/go.mod |
| 58 |
- name: Install gotmplfmt |
| 59 |
run: go install github.com/gohugoio/gotmplfmt@9aa02f78b401685c026c3184c4dd45cecfcc9161 # v0.5.0 |
| 60 |
- name: Check template formatting |
| 61 |
run: "diff <(gotmplfmt -d layouts) <(printf '')" |