Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools: add a document linter action #23921

Merged
merged 1 commit into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/document-lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: Resource Document Linting

permissions:
contents: read
pull-requests: read

on:
pull_request:
types: ["opened", "synchronize"]
paths:
- ".github/workflows/document-lint.yaml"
- "internal/services/**"
- "website/**"
branches: ["main"]

jobs:
document-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version-file: ./.go-version
- run: bash scripts/gogetcookie.sh
- run: make document-lint
continue-on-error: true
- name: check lint result
if: failure()
run: |
echo "::warning::Document linting failed. Please fix the issues."
3 changes: 3 additions & 0 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ ifeq (,$(wildcard $(GOPATH)/src/$(WEBSITE_REPO)))
endif
@$(MAKE) -C $(GOPATH)/src/$(WEBSITE_REPO) website-provider PROVIDER_PATH=$(shell pwd) PROVIDER_NAME=azurerm

document-lint:
go run $(CURDIR)/internal/tools/document-lint/main.go check

scaffold-website:
./scripts/scaffold-website.sh

Expand Down
Loading