feat: docker #58
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Doc synchronization | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
doc-sync: | |
name: check if doc is generate | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: sets up go environnement | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.21' | |
- name: Get dependencies | |
run: go mod download | |
- name: Install tfplugindocs | |
run: go install github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs | |
- 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 docs/ | |
git status docs/ | |
exit 1 | |
fi |