Skip to content

Commit 89a78f6

Browse files
committed
ci: update workflow
1 parent f3e2669 commit 89a78f6

File tree

4 files changed

+30
-10
lines changed

4 files changed

+30
-10
lines changed

.github/workflows/documentation.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,6 @@ jobs:
2222
output-method: replace
2323
git-push: true
2424

25-
- name: Ensure newline at end of README files
26-
run: |
27-
find . -type f -name 'README.md' -exec sh -c 'echo >> "{}"' \;
28-
working-directory: ${{ github.workspace }}
29-
3025
- name: Commit changes
3126
run: |
3227
git config --local user.email "action@github.com"

.github/workflows/pre-commit.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,34 @@ env:
1515
TFLINT_VERSION: v0.50.3
1616

1717
jobs:
18+
docs:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v4
23+
with:
24+
ref: ${{ github.event.pull_request.head.ref }}
25+
26+
- name: Render terraform docs and push changes back to PR
27+
uses: terraform-docs/gh-actions@main
28+
with:
29+
working-dir: .
30+
recursive: true
31+
recursive-path: modules
32+
output-file: README.md
33+
output-method: replace
34+
git-push: true
35+
36+
- name: Commit changes
37+
run: |
38+
git config --local user.email "action@github.com"
39+
git config --local user.name "GitHub Action"
40+
git add .
41+
git commit -m "Fix newline at end of README.md files"
42+
git push origin ${{ github.event.pull_request.head.ref }}
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45+
1846
collectInputs:
1947
name: Collect workflow inputs
2048
runs-on: ubuntu-latest

.pre-commit-config.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ repos:
33
rev: v1.89.0
44
hooks:
55
- id: terraform_fmt
6-
- id: terraform_docs
7-
args:
8-
- '--args=--lockfile=false'
96
- id: terraform_tflint
107
args:
118
- '--args=--only=terraform_deprecated_interpolation'

modules/account_users_and_groups_assignments/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ A Terraform module for assigning users and groups to AWS accounts.
1414

1515
| Name | Version |
1616
|------|---------|
17-
| <a name="provider_aws"></a> [aws](#provider\_aws) | 5.59.0 |
18-
| <a name="provider_null"></a> [null](#provider\_null) | 3.2.2 |
17+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.59.0 |
18+
| <a name="provider_null"></a> [null](#provider\_null) | ~> 3.2.2 |
1919

2020
## Modules
2121

0 commit comments

Comments
 (0)