Skip to content

Commit ddc5881

Browse files
Merge pull request #143 from bschaatsbergen/f/add-ci-job
replace precommit with a CI job
2 parents aba142b + 51eeb71 commit ddc5881

File tree

5 files changed

+45
-62
lines changed

5 files changed

+45
-62
lines changed

.github/workflows/ci.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: ci
2+
on:
3+
- pull_request
4+
5+
jobs:
6+
ci:
7+
runs-on: ubuntu-latest
8+
steps:
9+
# Setup dependencies
10+
- uses: actions/checkout@v3
11+
with:
12+
ref: ${{ github.event.pull_request.head.ref }}
13+
14+
# Run a couple of native Terraform checks
15+
- uses: hashicorp/setup-terraform@v3
16+
- run: terraform init
17+
- run: terraform fmt -recursive -check
18+
- run: terraform validate
19+
20+
# Checkov
21+
- uses: bridgecrewio/checkov-action@v12
22+
with:
23+
directory: .
24+
quiet: true
25+
skip_check: CKV_TF_1,CKV_GCP_32,CKV_GCP_34,CKV2_GCP_18
26+
framework: terraform
27+
28+
# Terraform-docs
29+
- uses: terraform-docs/[email protected]
30+
with:
31+
working-dir: .
32+
output-file: README.md
33+
output-method: inject
34+
fail-on-diff: true
35+
args: --lockfile=false
36+
git-push: "true" # automatically push the changes to the branch
37+

.github/workflows/pre-commit.yaml

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

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,8 @@ override.tf.json
3030

3131
# Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan
3232
# example: *tfplan*
33+
34+
# Checkov files
35+
checkov-problem-matcher-softfail.json
36+
checkov-problem-matcher.json
37+
results.sarif

.pre-commit-config.yaml

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

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,8 @@ This error indicates that the Google Cloud Managed SSL certificate is not yet fu
178178
If all configurations are correct, it may take up to 25 minutes for the certificate to be provisioned.
179179
You can check the status of the certificate in the Google Cloud Console.
180180

181-
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
181+
182+
<!-- BEGIN_TF_DOCS -->
182183
## Requirements
183184

184185
| Name | Version |
@@ -271,4 +272,4 @@ You can check the status of the certificate in the Google Cloud Console.
271272
| <a name="output_ip_address"></a> [ip\_address](#output\_ip\_address) | The IPv4 address of the load balancer |
272273
| <a name="output_managed_ssl_certificate_certificate_id"></a> [managed\_ssl\_certificate\_certificate\_id](#output\_managed\_ssl\_certificate\_certificate\_id) | The unique identifier of the Google Managed SSL certificate |
273274
| <a name="output_managed_ssl_certificate_expire_time"></a> [managed\_ssl\_certificate\_expire\_time](#output\_managed\_ssl\_certificate\_expire\_time) | Expire time of the Google Managed SSL certificate |
274-
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
275+
<!-- END_TF_DOCS -->

0 commit comments

Comments
 (0)