ci: bump actions/checkout from 4 to 6 (#11) #11
This file contains hidden or 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: Documentation | |
| on: | |
| push: | |
| branches: ["main"] | |
| paths: | |
| - 'examples/**/*.tf' | |
| - 'docs/**' | |
| - '.github/workflows/docs.yml' | |
| pull_request: | |
| branches: ["main"] | |
| paths: | |
| - 'examples/**/*.tf' | |
| - 'docs/**' | |
| - '.github/workflows/docs.yml' | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| terraform-docs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| ref: ${{ github.event.pull_request.head.ref }} | |
| repository: ${{ github.event.pull_request.head.repo.full_name }} | |
| - name: Generate docs for examples | |
| uses: terraform-docs/gh-actions@v1 | |
| with: | |
| working-dir: examples/basic,examples/flash-firmware,examples/full-provisioning,examples/talos-cluster,examples/k3s-cluster | |
| output-file: README.md | |
| output-method: inject | |
| git-push: false # Don't auto-push; branch protection requires signed commits via PRs | |
| - name: Check for uncommitted changes | |
| run: | | |
| if [[ -n $(git status --porcelain) ]]; then | |
| echo "::error::terraform-docs would update documentation. Run 'terraform-docs .' in each example directory and commit the changes." | |
| git diff | |
| exit 1 | |
| fi |