Skip to content

Commit 15c084d

Browse files
authored
Merge pull request terraform-docs#8 from Dirrk/release/v1.0.3
fix: release action failed
2 parents 2d482e1 + acc1939 commit 15c084d

File tree

11 files changed

+63
-79
lines changed

11 files changed

+63
-79
lines changed

.github/meta.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
major_version: 1
2-
version: 1.0.2
2+
version: 1.0.3

.github/workflows/pr-labeler.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.

.github/workflows/pre-release.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

.github/workflows/example.yml renamed to .github/workflows/pull_request.yml

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,38 @@
1-
name: Generate terraform docs
1+
name: Pull Request actions
22
on:
33
- pull_request
44
jobs:
5-
docs:
5+
6+
label:
7+
name: 'PR Labeler'
8+
if: github.event.action == 'opened'
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: TimonVS/pr-labeler-action@v3
12+
with:
13+
configuration-path: .github/pr-labeler.yml
14+
env:
15+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
16+
17+
fmt:
18+
name: 'Terraform fmt'
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: 'Checkout'
22+
uses: actions/checkout@master
23+
24+
- name: fmt
25+
uses: hashicorp/terraform-github-actions@master
26+
with:
27+
tf_actions_working_dir: examples
28+
tf_actions_version: '0.12.17'
29+
tf_actions_subcommand: 'fmt'
30+
tf_actions_comment: true
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
34+
build:
35+
name: 'Build example docs'
636
runs-on: ubuntu-latest
737
steps:
838
- uses: actions/checkout@v2
@@ -53,3 +83,19 @@ jobs:
5383
tf_docs_output_file: README.md
5484
tf_docs_git_push: 'true'
5585
tf_docs_git_commit_message: 'terraform-docs: automated action'
86+
87+
release:
88+
name: 'Release'
89+
needs: build
90+
if: startsWith(github.event.pull_request.head.ref, 'release')
91+
runs-on: ubuntu-latest
92+
steps:
93+
- uses: actions/checkout@v2
94+
with:
95+
ref: ${{ github.event.pull_request.head.ref }}
96+
fetch-depth: 0
97+
98+
- name: Generate files for release
99+
uses: ./
100+
with:
101+
entrypoint: "/pre-release.sh"

.github/workflows/terraform_fmt.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,9 @@
1-
<a name="unreleased"></a>
2-
## [Unreleased]
1+
2+
<a name="v1.0.3"></a>
3+
## [v1.0.3] - 2020-01-06
34
### Chore
4-
- automated generate readme
55
- automated release process
66

7-
### Features
8-
- added auto major tag
9-
- Added pre-release and release scripts
10-
- added pr template
11-
- Added images to docs
12-
- Add release draft action
13-
- Updated example documentation
14-
- on semvar tag also update the major tag
15-
167

178
<a name="v1.0.2"></a>
189
## [v1.0.2] - 2020-01-07
@@ -30,6 +21,6 @@
3021
## v1.0.0 - 2020-01-02
3122

3223

33-
[Unreleased]: https://github.com/Dirrk/terraform-docs/compare/v1.0.2...HEAD
24+
[v1.0.3]: https://github.com/Dirrk/terraform-docs/compare/v1.0.2...v1.0.3
3425
[v1.0.2]: https://github.com/Dirrk/terraform-docs/compare/v1.0.1...v1.0.2
3526
[v1.0.1]: https://github.com/Dirrk/terraform-docs/compare/v1.0.0...v1.0.1

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM derekrada/terraform-docs:v1.0.2
1+
FROM derekrada/terraform-docs:v1.0.3
22
COPY ./src/common.sh /common.sh
33
COPY ./src/docker-entrypoint.sh /docker-entrypoint.sh
44
COPY ./src/generate-readme.sh /generate-readme.sh

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# terraform-docs
22
A Github action for generating terraform module documentation using terraform-docs and gomplate. In addition to statically defined directory modules, this module can search specific sub folders or parse atlantis.yaml for module identification and doc generation. This action has the ability to auto commit docs to an open PR or after a push to a specific branch.
33
## Version
4-
v1.0.2
4+
v1.0.3
55

66
Supported and tested on terraform version 0.11+ & 0.12+ but may work for others.
77

@@ -20,7 +20,7 @@ jobs:
2020
ref: ${{ github.event.pull_request.head.ref }}
2121

2222
- name: Render terraform docs inside the USAGE.md and push changes back to PR branch
23-
uses: Dirrk/terraform-docs@v1.0.2
23+
uses: Dirrk/terraform-docs@v1.0.3
2424
with:
2525
tf_docs_working_dir: .
2626
tf_docs_output_file: USAGE.md
@@ -115,7 +115,7 @@ jobs:
115115
## Simple / Single folder
116116
```
117117
- name: Generate TF Docs
118-
uses: Dirrk/terraform-docs@v1.0.2
118+
uses: Dirrk/terraform-docs@v1.0.3
119119
with:
120120
tf_docs_working_dir: .
121121
tf_docs_output_file: README.md
@@ -124,17 +124,17 @@ jobs:
124124
## Use atlantis.yaml v3 to find all dirs
125125
```
126126
- name: Generate TF docs
127-
uses: Dirrk/terraform-docs@v1.0.2
127+
uses: Dirrk/terraform-docs@v1.0.3
128128
with:
129129
tf_docs_atlantis_file: atlantis.yaml
130130
```
131131
132132
## Find all .tf file folders under a given directory
133133
```yaml
134134
- name: Generate TF docs
135-
uses: Dirrk/terraform-docs@v1.0.2
135+
uses: Dirrk/terraform-docs@v1.0.3
136136
with:
137137
tf_docs_find_dir: examples/
138138
```
139139

140-
Complete examples can be found [here](https://github.com/Dirrk/terraform-docs/tree/v1.0.2/examples)
140+
Complete examples can be found [here](https://github.com/Dirrk/terraform-docs/tree/v1.0.3/examples)

src/generate-readme.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ set -e
33

44
. /common.sh
55

6-
export INPUT_TF_DOCS_GIT_COMMIT_MESSAGE="chore: automated generate readme"
6+
export INPUT_TF_DOCS_GIT_COMMIT_MESSAGE="skip: automated generate readme"
77
cd $GITHUB_WORKSPACE
88
git_setup
99

src/pre-release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ set -e
33

44
. /common.sh
55

6-
export INPUT_TF_DOCS_GIT_COMMIT_MESSAGE="chore: automated release process"
6+
export INPUT_TF_DOCS_GIT_COMMIT_MESSAGE="skip: automated release process"
77
cd $GITHUB_WORKSPACE
88
git_setup
99

0 commit comments

Comments
 (0)