Skip to content

Commit 2ad1fc5

Browse files
Merge pull request #106 from schubergphilis/docs-fix
fix the docs generation
2 parents 17b55b2 + 15bbf0c commit 2ad1fc5

File tree

6 files changed

+40
-2
lines changed

6 files changed

+40
-2
lines changed

sync-root/.github/workflows/label-synchronization.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# DO NOT CHANGE THIS FILE DIRECTLY
2+
# Source: https://github.com/schubergphilis/mcaf-github-workflows
3+
14
name: label-synchronization
25
on:
36
workflow_dispatch:

sync-root/.github/workflows/pr-validation.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# DO NOT CHANGE THIS FILE DIRECTLY
2+
# Source: https://github.com/schubergphilis/mcaf-github-workflows
3+
14
name: "pr-validation"
25

36
on:

sync-root/.github/workflows/release-drafter.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# DO NOT CHANGE THIS FILE DIRECTLY
2+
# Source: https://github.com/schubergphilis/mcaf-github-workflows
3+
14
name: "release-drafter"
25

36
on:

sync-root/.github/workflows/terraform-validation.yaml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# DO NOT CHANGE THIS FILE DIRECTLY
2+
# Source: https://github.com/schubergphilis/mcaf-github-workflows
3+
14
name: "terraform"
25

36
on:
@@ -116,14 +119,36 @@ jobs:
116119
- name: Render terraform docs inside the README.md and push changes back to PR branch
117120
uses: terraform-docs/gh-actions@v1.3.0
118121
with:
119-
args: --sort-by required --recursive
122+
args: --sort-by required
120123
git-commit-message: "docs(readme): update module usage"
121124
git-push: true
122125
output-file: README.md
123126
output-method: inject
124127
working-dir: .
125128
continue-on-error: true # added this to prevent a PR from a remote fork failing the workflow
126129

130+
# If the recursive flag is set to true, the action will not update the main README.md file.
131+
# Therefore we need to run the action twice, once for the root module and once for the modules directory
132+
docs-modules:
133+
runs-on: ubuntu-latest
134+
steps:
135+
- name: Checkout code
136+
uses: actions/checkout@v4
137+
with:
138+
ref: ${{ github.event.pull_request.head.ref }}
139+
140+
- name: Render terraform docs inside the README.md and push changes back to PR branch
141+
uses: terraform-docs/gh-actions@v1.3.0
142+
with:
143+
args: --sort-by required
144+
git-commit-message: "docs(readme): update module usage"
145+
git-push: true
146+
output-file: README.md
147+
output-method: inject
148+
recursive-path: modules
149+
recursive: true
150+
working-dir: .
151+
continue-on-error: true # added this to prevent a PR from a remote fork failing the workflow
127152

128153
checkov:
129154
runs-on: ubuntu-latest

sync-root/.github/workflows/update-changelog.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# DO NOT CHANGE THIS FILE DIRECTLY
2+
# Source: https://github.com/schubergphilis/mcaf-github-workflows
3+
14
name: "update-changelog"
25

36
on:

sync-root/.pre-commit-config.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# .pre-commit-config.yaml
1+
# DO NOT CHANGE THIS FILE DIRECTLY
2+
# Source: https://github.com/schubergphilis/mcaf-github-workflows
23
default_stages: [pre-commit]
34
repos:
45
- repo: https://github.com/pre-commit/pre-commit-hooks

0 commit comments

Comments
 (0)