-
Notifications
You must be signed in to change notification settings - Fork 19
67 lines (60 loc) · 2.01 KB
/
terraform-docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
---
name: terraform-docs
on: # yamllint disable-line rule:truthy
pull_request:
paths:
- "terraform/**.tf"
- "terraform/terraform.auto.tfvars.example"
permissions:
contents: write
pull-requests: write
id-token: write
issues: write
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
jobs:
terraform-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 0
# - uses: asannou/tfmermaid-action@dae450b175614c7448d85e5081f79b19e99fc1f8
# with:
# working-directory: terraform/
# file: README.md
# exclude: data,var,output
- name: Render terraform docs inside the README.md and push changes back to PR branch
uses: terraform-docs/gh-actions@aeae0038ed47a547e0c0fca5c059d3335f48fb25
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
working-dir: terraform/
output-file: README.md
output-method: inject
git-push: "true"
# - uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65
# with:
# node-version: 18
#
# - run: npm install markdown-table-formatter -g
#
# - name: Markdown lint table formatter
# run: markdown-table-formatter README.md
# - name: Create Pull Request
# id: cpr
# uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38
# with:
# token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
# commit-message: "[terraform-docs] Compile terraform documentation"
# title: "[terraform-docs] Compile terraform documentation"
# labels: bot
# base: ${{ github.event.pull_request.head.ref }}
# #delete-branch: true
# - name: pull-request
# uses: diillson/auto-pull-request@4cf50b3681cd76250f37841466e61e514a377064
# with:
# destination_branch: "main"
# github_token: ${{ secrets.PAT }}