Skip to content

Commit 69fd71e

Browse files
authored
Update docs and fix tfsec-comment (#2)
* docs: add disclaimer * feat: add a condition to run tfsec-comment
1 parent baa9e18 commit 69fd71e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.github/workflows/terraform.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ jobs:
3030
terraform_version: ${{ inputs.tf_version }}
3131
terraform_wrapper: ${{ inputs.tf_wrapper }}
3232

33-
3433
- name: Terraform format
3534
id: fmt
3635
run: terraform fmt -check
@@ -44,6 +43,7 @@ jobs:
4443
run: terraform validate -no-color
4544

4645
- name: TFSec validation
46+
if: ${{ github.event.pull_request.base.ref == 'main' }}
4747
uses: aquasecurity/tfsec-pr-commenter-action@main
4848
with:
4949
github_token: ${{ secrets.token }}

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Terraform workflow to be reused in your project.
55
* https://github.com/marketplace/actions/hashicorp-setup-terraform
66
* https://github.com/marketplace/actions/run-tfsec-pr-commenter
77

8+
**Disclaimer:** The tfsec commenter will run ONLY in pull requests
89

910
## Inputs
1011
* `tf_version`: Terraform version (type: string, default: 1.0.0)]
@@ -29,4 +30,4 @@ jobs:
2930
TODO
3031

3132
## License
32-
Distributed under the MIT License. See `LICENSE` for more information.
33+
Distributed under the MIT License. See `LICENSE` for more information.

0 commit comments

Comments
 (0)