mirror of
https://github.com/kreuzwerker/terraform-provider-docker.git
synced 2026-01-18 20:52:55 -05:00
66 lines
1.9 KiB
YAML
66 lines
1.9 KiB
YAML
name: Docs and Website Lint
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
- "release/**"
|
|
pull_request:
|
|
types: ['opened', 'synchronize']
|
|
paths:
|
|
- .github/workflows/website-lint.yaml
|
|
- docs/**
|
|
|
|
env:
|
|
GOPROXY: https://proxy.golang.org,direct
|
|
GO_VERSION: "1.17"
|
|
|
|
jobs:
|
|
website-generation:
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-go@v2
|
|
with:
|
|
go-version: ${{ env.GO_VERSION }}
|
|
- name: Setup tools
|
|
run: make setup
|
|
- name: Explicitly get tfplugindocs
|
|
run: go get github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs
|
|
- name: Generate the website
|
|
run: make website-generation
|
|
- name: Verify Changed files
|
|
uses: tj-actions/verify-changed-files@v8.8
|
|
id: verify-changed-files
|
|
with:
|
|
files: |
|
|
docs/**/*.md
|
|
- name: Display changed files
|
|
if: steps.verify-changed-files.outputs.files_changed == 'true'
|
|
run: |
|
|
echo "Changed files: ${{ steps.verify_changed_files.outputs.changed_files }}"
|
|
- name: Fail if files have changed
|
|
if: steps.verify-changed-files.outputs.files_changed == 'true'
|
|
run: |
|
|
echo "Generated website was not up-to-date. Please run 'make website-generation' locally, commit, and push again";
|
|
exit 1;
|
|
website-lint-spellcheck-tffmt:
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-go@v2
|
|
with:
|
|
go-version: ${{ env.GO_VERSION }}
|
|
- run: docker version
|
|
- name: Setup tools
|
|
run: make setup
|
|
- name: Lint website
|
|
run: make website-lint
|
|
markdown-lint:
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: avto-dev/markdown-lint@v1
|
|
with:
|
|
args: 'docs'
|
|
config: '.markdownlint.yml'
|
|
|