Skip to content

Commit

Permalink
Add tfplugindocs github workflow to lint pull requests
Browse files Browse the repository at this point in the history
  • Loading branch information
ddelnano committed May 13, 2023
1 parent 38afe58 commit 5265f71
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/tfplugindocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: 'tfplugindocs'
on:
pull_request:
permissions:
contents: read
jobs:
tfplugindocs:
permissions:
contents: read
pull-requests: read
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.18
- name: Get dependencies
run: go mod download
- name: Run tfplugindocs
run: go generate ./...

- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Fail if any files changed
shell: bash
run: |
if [[ $(git status --porcelain=v1 | wc -l) -ne 0 ]]; then
echo "Please ensure tfplugindocs changes are committed"
echo "Changed files:"
git diff --name-only
exit 1
fi

0 comments on commit 5265f71

Please sign in to comment.