Skip to content

Commit

Permalink
Merge pull request #156 from ddelnano/ddelnano/add-tfplugindocs-linting
Browse files Browse the repository at this point in the history
  • Loading branch information
ddelnano authored May 24, 2023
2 parents 3a05b73 + f9feb1d commit bd098a2
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ jobs:

steps:
- name: Set up Go
uses: actions/setup-go@v1
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v1
uses: actions/checkout@v3

- name: Get dependencies
run: go mod download
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
-
name: Unshallow
run: git fetch --prune --unshallow
-
name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: 1.18
-
Expand Down
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: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Get dependencies
run: go mod download
- name: Run tfplugindocs
run: go generate ./...
- name: Fail if any files changed
shell: bash
run: |
if [[ $(git status --porcelain=v1 docs/ | wc -l) -ne 0 ]]; then
echo "Please ensure tfplugindocs changes are committed to docs/"
echo "Changed files:"
git diff --name-only docs/
git status docs/
exit 1
fi

0 comments on commit bd098a2

Please sign in to comment.