feat(workflows): init terraform
This commit is contained in:
@@ -1,10 +1,6 @@
|
|||||||
name: checks-trivy
|
name: checks-trivy
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
ssh-private-key:
|
|
||||||
required: true
|
|
||||||
ssh-known-hosts:
|
|
||||||
required: true
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
checks-trivy:
|
checks-trivy:
|
||||||
@@ -12,21 +8,8 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: hashicorp/setup-terraform@v2
|
|
||||||
with:
|
|
||||||
terraform_version: 1.5.7
|
|
||||||
cli_config_credentials_token: ${{ secrets.TF_API_TOKEN }}
|
|
||||||
- name: Clone repo
|
- name: Clone repo
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: Setup SSH key
|
|
||||||
uses: benoitchantre/setup-ssh-authentication-action@1.0.1
|
|
||||||
with:
|
|
||||||
private-key: ${{ secrets.ssh-private-key }}
|
|
||||||
private-key-name: id_ed25519
|
|
||||||
known-hosts: ${{ secrets.ssh-known-hosts }}
|
|
||||||
- name: Run terraform init
|
|
||||||
shell: bash
|
|
||||||
run: terraform init
|
|
||||||
- name: Run Trivy vulnerability scanner in IaC mode (LOW/MED)
|
- name: Run Trivy vulnerability scanner in IaC mode (LOW/MED)
|
||||||
uses: aquasecurity/trivy-action@master
|
uses: aquasecurity/trivy-action@master
|
||||||
with:
|
with:
|
||||||
|
|||||||
Reference in New Issue
Block a user