Skip to content

Commit

Permalink
Updating github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
madduci committed Dec 14, 2024
1 parent d8f6d2d commit f7c4495
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 28 deletions.
19 changes: 5 additions & 14 deletions .github/workflows/opentofu-plan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
fail-fast: false
matrix:
type: [plain, istio, cilium]
type: [nginx, istio, cilium]

name: 'Terraform'
runs-on: ubuntu-latest
Expand All @@ -39,26 +39,17 @@ jobs:
run: cd cluster && tofu init

- name: Terraform Plan (Plain)
if: matrix.type == 'plain'
run: cd cluster && tofu plan -no-color -out=tfplan.out && tofu show -json tfplan.out > tfplan.json

- name: Terraform Plan (With Istio)
if: matrix.type == 'istio'
run: cd cluster && tofu plan -var="enable_istio=true" -no-color -out=tfplan.out && tofu show -json tfplan.out > tfplan.json

- name: Terraform Plan (With Cilium)
if: matrix.type == 'cilium'
run: cd cluster && tofu plan -var="enable_cilium=true" -no-color -out=tfplan.out && tofu show -json tfplan.out > tfplan.json
run: cd examples/kind-with-${matrix.type} && tofu plan -no-color -out=tfplan.out && tofu show -json tfplan.out > tfplan.json

- name: Output Plan
run: cat cluster/tfplan.json
run: cat tfplan.json

- name: Checkov Analysis
id: checkov
uses: bridgecrewio/checkov-action@v12
with:
directory: cluster/
file: cluster/tfplan.json
directory: examples/kind-with-${matrix.type}/
file: examples/kind-with-${matrix.type}/tfplan.json
output_format: cli,sarif
output_file_path: console,results.sarif
# Ignoring checks since the original helm charts is so configure
Expand Down
19 changes: 5 additions & 14 deletions .github/workflows/terraform-plan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
fail-fast: false
matrix:
type: [plain, istio, cilium]
type: [nginx, istio, cilium]

name: 'Terraform'
runs-on: ubuntu-latest
Expand All @@ -39,26 +39,17 @@ jobs:
run: cd cluster && terraform init

- name: Terraform Plan (Plain)
if: matrix.type == 'plain'
run: cd cluster && terraform plan -no-color -out=tfplan.out && terraform show -json tfplan.out > tfplan.json

- name: Terraform Plan (With Istio)
if: matrix.type == 'istio'
run: cd cluster && terraform plan -var="enable_istio=true" -no-color -out=tfplan.out && terraform show -json tfplan.out > tfplan.json

- name: Terraform Plan (With Cilium)
if: matrix.type == 'cilium'
run: cd cluster && terraform plan -var="enable_cilium=true" -no-color -out=tfplan.out && terraform show -json tfplan.out > tfplan.json
run: cd examples/kind-with-${matrix.type} && terraform plan -no-color -out=tfplan.out && terraform show -json tfplan.out > tfplan.json

- name: Output Plan
run: cat cluster/tfplan.json
run: cat tfplan.json

- name: Checkov Analysis
id: checkov
uses: bridgecrewio/checkov-action@v12
with:
directory: cluster/
file: cluster/tfplan.json
directory: examples/kind-with-${matrix.type}/
file: examples/kind-with-${matrix.type}/tfplan.json
output_format: cli,sarif
output_file_path: console,results.sarif
# Ignoring checks since the original helm charts is so configure
Expand Down

0 comments on commit f7c4495

Please sign in to comment.