Skip to content

Commit c298af2

Browse files
authored
Add command to generate README in Atmos config (#229)
* Add command to generate README in Atmos config * Add readme command to GitHub Action configuration * Add 'readme' command to terraform-module.yaml * Upgrade readme action to version 2
1 parent 01afdf0 commit c298af2

File tree

4 files changed

+21
-1
lines changed

4 files changed

+21
-1
lines changed

.github/atmos/default.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,8 @@ docs:
1717
sort_by: "name"
1818
hide_empty: false
1919
indent_level: 2
20+
21+
commands:
22+
- name: readme
23+
steps:
24+
- "atmos docs generate readme"

.github/atmos/github-action.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,8 @@ docs:
77
- "./README.yaml"
88
template: "https://raw.githubusercontent.com/cloudposse/.github/refs/heads/main/README.md.gotmpl"
99
output: "./README.md"
10+
11+
commands:
12+
- name: readme
13+
steps:
14+
- "atmos docs generate readme"

.github/atmos/terraform-module.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ docs:
1919
indent_level: 2
2020

2121
commands:
22+
- name: readme
23+
steps:
24+
- "atmos docs generate readme"
25+
2226
- name: test
2327
commands:
2428
- name: "init"

.github/workflows/shared-readme.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,17 @@ jobs:
3838
fetch-depth: 0
3939
token: ${{ steps.github-app.outputs.token }}
4040

41-
- uses: cloudposse-github-actions/readme@v1
41+
- uses: cloudposse-github-actions/readme@v2
42+
id: readme
4243
with:
4344
token: ${{ steps.github-app.outputs.token }}
4445
readme_enabled: true
4546
banner_enabled: true
4647
validate_readme: true
4748
commit_method: 'commit'
4849
commit_push_options: '--force-with-lease'
50+
command: readme
51+
sign-commits: true
52+
53+
- run: |-
54+
echo "${{ steps.readme.outputs.changes_detected }}"

0 commit comments

Comments
 (0)