Skip to content

Commit

Permalink
chore: add ci-cd workflow for pre-commit checks (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
bryantbiggs authored Feb 24, 2021
1 parent 27be1f8 commit 7653d54
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,11 @@ jobs:
curl -L "$(curl -s https://api.github.com/repos/terraform-linters/tflint/releases/latest | grep -o -E "https://.+?_linux_amd64.zip")" > tflint.zip && unzip tflint.zip && rm tflint.zip && sudo mv tflint /usr/bin/
- name: Execute pre-commit
# Run only validate pre-commit check on min version supported
if: ${{ matrix.version == needs.getBaseVersion.outputs.minVersion }}
run: pre-commit run --color=always --show-diff-on-failure --all-files terraform_validate

- name: Execute pre-commit
# Run all pre-commit checks on max version supported
if: ${{ matrix.version == needs.getBaseVersion.outputs.maxVersion }}
run: pre-commit run --color=always --show-diff-on-failure --all-files
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ No Modules.

| Name |
|------|
| [aws_arn](https://registry.terraform.io/providers/hashicorp/aws/2.30/docs/data-sources/arn) |
| [aws_sqs_queue](https://registry.terraform.io/providers/hashicorp/aws/2.30/docs/resources/sqs_queue) |
| [aws_arn](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/arn) |
| [aws_sqs_queue](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/sqs_queue) |

## Inputs

Expand Down
2 changes: 1 addition & 1 deletion examples/complete/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Note that this example may create resources which cost money. Run `terraform des

| Name |
|------|
| [aws_kms_key](https://registry.terraform.io/providers/hashicorp/aws/2.30/docs/resources/kms_key) |
| [aws_kms_key](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/kms_key) |

## Inputs

Expand Down

0 comments on commit 7653d54

Please sign in to comment.