Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace precommit with a CI job #143

Merged
merged 8 commits into from Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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 -->