Skip to content

Commit ec1c66c

Browse files
committed
feature: hashicorp/terraform:1.4.5 release
1 parent 93d6a89 commit ec1c66c

File tree

6 files changed

+43
-29
lines changed

6 files changed

+43
-29
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## v1.6.0
4+
5+
- Forked from <https://github.com/robburger/terraform-pr-commenter> project.
6+
- Use [hashicorp/terraform:1.4.5](https://hub.docker.com/r/hashicorp/terraform) container base image.
7+
38
## v1.5.0
49

510
- Bump to Terraform v1.0.6 internally (only affects `fmt`)

Dockerfile

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
1-
FROM hashicorp/terraform:1.0.6
1+
FROM hashicorp/terraform:1.4.5
22

3-
LABEL repository="https://github.com/robburger/terraform-pr-commenter" \
4-
homepage="https://github.com/robburger/terraform-pr-commenter" \
5-
maintainer="Rob Burger" \
6-
com.github.actions.name="Terraform PR Commenter" \
7-
com.github.actions.description="Adds opinionated comments to a PR from Terraform fmt/init/plan output" \
8-
com.github.actions.icon="git-pull-request" \
9-
com.github.actions.color="purple"
3+
LABEL \
4+
repository="https://github.com/sheeeng/terraform-pull-request-commenter" \
5+
homepage="https://github.com/sheeeng/terraform-pull-request-commenter" \
6+
maintainer="Leonard Sheng Sheng Lee" \
7+
com.github.actions.name="Terraform Pull Request Commenter" \
8+
com.github.actions.description="Adds opinionated comments to a PR from Terraform fmt/init/plan output." \
9+
com.github.actions.icon="git-pull-request" \
10+
com.github.actions.color="purple"
1011

11-
RUN apk add --no-cache -q \
12-
bash \
13-
curl \
14-
jq
12+
RUN apk add \
13+
--no-cache \
14+
--quiet \
15+
bash=~5 \
16+
curl=~8 \
17+
jq=~1
1518

16-
ADD entrypoint.sh /entrypoint.sh
19+
COPY entrypoint.sh /entrypoint.sh
1720
RUN chmod +x /entrypoint.sh
1821

1922
ENTRYPOINT ["/entrypoint.sh"]

LICENSE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
MIT License
22

33
Copyright (c) 2020 Rob Burger
4+
Copyright (c) 2023 Leonard Sheng Sheng Lee
45

56
Permission is hereby granted, free of charge, to any person obtaining a copy
67
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
# Terraform PR Commenter
1+
# Terraform Pull Request Commenter
2+
3+
> This project was forked from <https://github.com/robburger/terraform-pr-commenter> project, originally created by [
4+
Rob Burger](https://github.com/robburger).
25

36
Adds opinionated comments to PR's based on Terraform `fmt`, `init`, `plan` and `validate` outputs.
47

8+
## CURRENTLY WORK IN PROGRESS
9+
510
## Summary
611

712
This Docker-based GitHub Action is designed to work in tandem with [hashicorp/setup-terraform](https://github.com/hashicorp/setup-terraform) with the **wrapper enabled**, taking the output from a `fmt`, `init`, `plan` or `validate`, formatting it and adding it to a pull request. Any previous comments from this Action are removed to keep the PR timeline clean.
@@ -15,7 +20,7 @@ Support (for now) is [limited to Linux](https://help.github.com/en/actions/creat
1520
This action can only be run after a Terraform `fmt`, `init`, `plan` or `validate` has completed, and the output has been captured. Terraform rarely writes to `stdout` and `stderr` in the same action, so we concatenate the `commenter_input`:
1621

1722
```yaml
18-
- uses: robburger/terraform-pr-commenter@v1
23+
- uses: sheeeng/terraform-pull-request-commenter@v1
1924
env:
2025
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2126
with:
@@ -55,7 +60,7 @@ jobs:
5560
uses: actions/checkout@v2
5661
...
5762
- name: Post Plan
58-
uses: robburger/terraform-pr-commenter@v1
63+
uses: sheeeng/terraform-pull-request-commenter@v1
5964
env:
6065
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6166
EXPAND_SUMMARY_DETAILS: 'true' # Override global environment variable; expand details just for this step
@@ -103,7 +108,7 @@ jobs:
103108
104109
- name: Post Format
105110
if: always() && github.ref != 'refs/heads/master' && (steps.fmt.outcome == 'success' || steps.fmt.outcome == 'failure')
106-
uses: robburger/terraform-pr-commenter@v1
111+
uses: sheeeng/terraform-pull-request-commenter@v1
107112
with:
108113
commenter_type: fmt
109114
commenter_input: ${{ format('{0}{1}', steps.fmt.outputs.stdout, steps.fmt.outputs.stderr) }}
@@ -115,7 +120,7 @@ jobs:
115120
116121
- name: Post Init
117122
if: always() && github.ref != 'refs/heads/master' && (steps.init.outcome == 'success' || steps.init.outcome == 'failure')
118-
uses: robburger/terraform-pr-commenter@v1
123+
uses: sheeeng/terraform-pull-request-commenter@v1
119124
with:
120125
commenter_type: init
121126
commenter_input: ${{ format('{0}{1}', steps.init.outputs.stdout, steps.init.outputs.stderr) }}
@@ -127,7 +132,7 @@ jobs:
127132
128133
- name: Post Validate
129134
if: always() && github.ref != 'refs/heads/master' && (steps.validate.outcome == 'success' || steps.validate.outcome == 'failure')
130-
uses: robburger/terraform-pr-commenter@v1
135+
uses: sheeeng/terraform-pull-request-commenter@v1
131136
with:
132137
commenter_type: validate
133138
commenter_input: ${{ format('{0}{1}', steps.validate.outputs.stdout, steps.validate.outputs.stderr) }}
@@ -139,7 +144,7 @@ jobs:
139144
140145
- name: Post Plan
141146
if: always() && github.ref != 'refs/heads/master' && (steps.plan.outcome == 'success' || steps.plan.outcome == 'failure')
142-
uses: robburger/terraform-pr-commenter@v1
147+
uses: sheeeng/terraform-pull-request-commenter@v1
143148
with:
144149
commenter_type: plan
145150
commenter_input: ${{ format('{0}{1}', steps.plan.outputs.stdout, steps.plan.outputs.stderr) }}
@@ -182,7 +187,7 @@ jobs:
182187
183188
- name: Post Init - ${{ matrix['workspace'] }}
184189
if: always() && github.ref != 'refs/heads/master' && (steps.init.outcome == 'success' || steps.init.outcome == 'failure')
185-
uses: robburger/terraform-pr-commenter@v1
190+
uses: sheeeng/terraform-pull-request-commenter@v1
186191
with:
187192
commenter_type: init
188193
commenter_input: ${{ format('{0}{1}', steps.init.outputs.stdout, steps.init.outputs.stderr) }}
@@ -194,7 +199,7 @@ jobs:
194199
195200
- name: Post Plan - ${{ matrix['workspace'] }}
196201
if: always() && github.ref != 'refs/heads/master' && (steps.plan.outcome == 'success' || steps.plan.outcome == 'failure')
197-
uses: robburger/terraform-pr-commenter@v1
202+
uses: sheeeng/terraform-pull-request-commenter@v1
198203
with:
199204
commenter_type: plan
200205
commenter_input: ${{ format('{0}{1}', steps.plan.outputs.stdout, steps.plan.outputs.stderr) }}
@@ -230,7 +235,7 @@ In English: "Always run this step, but only on a pull request and only when the
230235

231236
## Troubleshooting & Contributing
232237

233-
Feel free to head over to the [Issues](https://github.com/robburger/terraform-pr-commenter/issues) tab to see if the issue you're having has already been reported. If not, [open a new one](https://github.com/robburger/terraform-pr-commenter/issues/new) and be sure to include as much relevant information as possible, including code-samples, and a description of what you expect to be happening.
238+
Feel free to head over to the [Issues](https://github.com/sheeeng/terraform-pull-request-commenter/issues) tab to see if the issue you're having has already been reported. If not, [open a new one](https://github.com/sheeeng/terraform-pull-request-commenter/issues/new) and be sure to include as much relevant information as possible, including code-samples, and a description of what you expect to be happening.
234239

235240
## License
236241

action.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
name: 'Terraform PR Commenter'
2-
description: 'Adds opinionated comments to a PR from Terraform fmt/init/plan output'
3-
author: 'Rob Burger'
1+
name: 'Terraform Pull Request Commenter'
2+
description: 'Adds opinionated comments to a PR from Terraform fmt/init/plan output.'
3+
author: 'Leonard Sheng Sheng Lee'
44
branding:
55
icon: 'git-pull-request'
66
color: 'purple'
77
inputs:
88
commenter_type:
9-
description: 'The type of comment. Options: [fmt, init, plan]'
9+
description: 'The type of comment. Options: [fmt, init, plan].'
1010
required: true
1111
commenter_input:
12-
description: 'The comment to post from a previous step output'
12+
description: 'The comment to post from a previous step output.'
1313
required: true
1414
commenter_exitcode:
15-
description: 'The exit code from a previous step output'
15+
description: 'The exit code from a previous step output.'
1616
required: true
1717
runs:
1818
using: 'docker'

entrypoint.sh

100644100755
File mode changed.

0 commit comments

Comments
 (0)