Skip to content

Commit

Permalink
Merge pull request #143 from bschaatsbergen/f/add-ci-job
Browse files Browse the repository at this point in the history
replace precommit with a CI job
  • Loading branch information
bschaatsbergen committed Mar 27, 2024
2 parents aba142b + 51eeb71 commit ddc5881
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 62 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/ci.yaml
@@ -0,0 +1,37 @@
name: ci
on:
- pull_request

jobs:
ci:
runs-on: ubuntu-latest
steps:
# Setup dependencies
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}

# Run a couple of native Terraform checks
- uses: hashicorp/setup-terraform@v3
- run: terraform init
- run: terraform fmt -recursive -check
- run: terraform validate

# Checkov
- uses: bridgecrewio/checkov-action@v12
with:
directory: .
quiet: true
skip_check: CKV_TF_1,CKV_GCP_32,CKV_GCP_34,CKV2_GCP_18
framework: terraform

# Terraform-docs
- uses: terraform-docs/gh-actions@v1.1.0
with:
working-dir: .
output-file: README.md
output-method: inject
fail-on-diff: true
args: --lockfile=false
git-push: "true" # automatically push the changes to the branch

38 changes: 0 additions & 38 deletions .github/workflows/pre-commit.yaml

This file was deleted.

5 changes: 5 additions & 0 deletions .gitignore
Expand Up @@ -30,3 +30,8 @@ override.tf.json

# Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan
# example: *tfplan*

# Checkov files
checkov-problem-matcher-softfail.json
checkov-problem-matcher.json
results.sarif
22 changes: 0 additions & 22 deletions .pre-commit-config.yaml

This file was deleted.

5 changes: 3 additions & 2 deletions README.md
Expand Up @@ -178,7 +178,8 @@ This error indicates that the Google Cloud Managed SSL certificate is not yet fu
If all configurations are correct, it may take up to 25 minutes for the certificate to be provisioned.
You can check the status of the certificate in the Google Cloud Console.

<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

<!-- BEGIN_TF_DOCS -->
## Requirements

| Name | Version |
Expand Down Expand Up @@ -271,4 +272,4 @@ You can check the status of the certificate in the Google Cloud Console.
| <a name="output_ip_address"></a> [ip\_address](#output\_ip\_address) | The IPv4 address of the load balancer |
| <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 |
| <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 |
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
<!-- END_TF_DOCS -->

0 comments on commit ddc5881

Please sign in to comment.