|
38 | 38 | with:
|
39 | 39 | tflint_version: latest
|
40 | 40 |
|
41 |
| - - name: Download and install Terraform Docs |
42 |
| - run: | |
43 |
| - curl -Lo ./terraform-docs.tar.gz https://github.com/terraform-docs/terraform-docs/releases/download/v0.17.0/terraform-docs-v0.17.0-$(uname)-amd64.tar.gz |
44 |
| - tar -xzf terraform-docs.tar.gz |
45 |
| - chmod +x terraform-docs |
46 |
| - mv terraform-docs /usr/local/bin/terraform-docs |
47 |
| - rm -f terraform-docs.tar.gz |
48 |
| -
|
49 |
| - - name: Generate Terraform Docs 🗒️ |
50 |
| - run: | |
51 |
| - # Get folders which contain .tf files |
52 |
| - folder_list=$(find . -name '*.tf' -printf '%h\n' | sort -u) |
53 |
| - |
54 |
| - # Run terraform-docs command for each subfolder |
55 |
| - for folder in $folder_list; do |
56 |
| - terraform-docs markdown table --output-file README.md "$folder" |
57 |
| - done |
58 |
| -
|
59 |
| - - name: Run Terraform fmt ✅ |
60 |
| - run: | |
61 |
| - terraform fmt -recursive |
62 |
| -
|
63 |
| - - name: Check for changed files 🕵️ |
64 |
| - uses: tj-actions/verify-changed-files@6ed7632824d235029086612d4330d659005af687 # v20 |
65 |
| - id: verify-changed-files |
66 |
| - |
67 |
| - - name: Commit Terraform code changes 🖊️ |
68 |
| - if: steps.verify-changed-files.outputs.files_changed == 'true' |
69 |
| - uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5 # v9 |
70 |
| - with: |
71 |
| - default_author: github_actor |
72 |
| - author_name: "braid-bot[bot]" |
73 |
| - author_email: "169546839+braid-bot[bot]@users.noreply.github.com" |
74 |
| - message: | |
75 |
| - "🤖 Automated commit for Workflow Run ID: ${{ github.run_id }} in Branch: ${{ github.head_ref }}" |
76 |
| -
|
77 | 41 | changelog:
|
78 | 42 | name: Generate Changelog 🗒️
|
79 | 43 | runs-on: ubuntu-latest
|
|
0 commit comments