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

Add github workflow for tfplugindocs linting and unify setup-go and checkout action versions #156

Merged
merged 5 commits into from
May 24, 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
4 changes: 2 additions & 2 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ jobs:
legacy_bgp_support: false
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