-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dfc5d6f
commit dd9cb26
Showing
3 changed files
with
102 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
name: checkers | ||
# name: checkers | ||
|
||
on: | ||
push: | ||
branches: | ||
- iac | ||
# on: | ||
# push: | ||
# branches: | ||
# - iac | ||
|
||
permissions: read-all | ||
# permissions: read-all | ||
|
||
jobs: | ||
tfsec: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name : Check out Git Repository | ||
uses: actions/checkout@v2 | ||
- name: Run Tfsec | ||
uses: aquasecurity/[email protected] | ||
# jobs: | ||
# tfsec: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name : Check out Git Repository | ||
# uses: actions/checkout@v2 | ||
# - name: Run Tfsec | ||
# uses: aquasecurity/[email protected] | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,71 @@ | ||
name: IaC | ||
|
||
on: | ||
workflow_run: | ||
workflows: ["linters", "checkers"] | ||
types: | ||
- completed | ||
push: | ||
branches: | ||
- iac | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
ansible-lint: | ||
name: Ansible Lint | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
shell: bash | ||
working-directory: ./ansible | ||
steps: | ||
- name: Checkout source code | ||
uses: actions/checkout@v4 | ||
- name: Run ansible-lint | ||
uses: ansible/ansible-lint@main | ||
|
||
terraform-lint: | ||
name: Terraform Lint | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
shell: bash | ||
working-directory: ./terraform | ||
steps: | ||
- name: Checkout source code | ||
uses: actions/checkout@v4 | ||
- name: Setup TFLint | ||
uses: terraform-linters/setup-tflint@v4 | ||
with: | ||
tflint_version: v0.52.0 | ||
- name: Show version | ||
run: tflint --version | ||
- name: Init TFLint | ||
run: tflint --init | ||
- name: Run TFLint | ||
run: tflint -f compact | ||
|
||
terraform-sec: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name : Check out Git Repository | ||
uses: actions/checkout@v2 | ||
- name: Run Tfsec | ||
uses: aquasecurity/[email protected] | ||
|
||
terraform: | ||
name: Terraform | ||
runs-on: ubuntu-latest | ||
environment: production | ||
|
||
needs: | ||
- ansible-lint | ||
- terraform-lint | ||
- terraform-sec | ||
defaults: | ||
run: | ||
shell: bash | ||
working-directory: ./terraform | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup SSH | ||
shell: bash | ||
run: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,43 @@ | ||
name: linters | ||
# name: linters | ||
|
||
on: | ||
push: | ||
branches: | ||
- iac | ||
# on: | ||
# push: | ||
# branches: | ||
# - iac | ||
|
||
permissions: read-all | ||
# permissions: read-all | ||
|
||
jobs: | ||
ansible-lint: | ||
name: Ansible Lint | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
shell: bash | ||
working-directory: ./ansible | ||
steps: | ||
- name: Checkout source code | ||
uses: actions/checkout@v4 | ||
- name: Run ansible-lint | ||
uses: ansible/ansible-lint@main | ||
# jobs: | ||
# ansible-lint: | ||
# name: Ansible Lint | ||
# runs-on: ubuntu-latest | ||
# defaults: | ||
# run: | ||
# shell: bash | ||
# working-directory: ./ansible | ||
# steps: | ||
# - name: Checkout source code | ||
# uses: actions/checkout@v4 | ||
# - name: Run ansible-lint | ||
# uses: ansible/ansible-lint@main | ||
|
||
tflint: | ||
name: Terraform Lint | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
shell: bash | ||
working-directory: ./terraform | ||
steps: | ||
- name: Checkout source code | ||
uses: actions/checkout@v4 | ||
- name: Setup TFLint | ||
uses: terraform-linters/setup-tflint@v4 | ||
with: | ||
tflint_version: v0.52.0 | ||
- name: Show version | ||
run: tflint --version | ||
- name: Init TFLint | ||
run: tflint --init | ||
- name: Run TFLint | ||
run: tflint -f compact | ||
# tflint: | ||
# name: Terraform Lint | ||
# runs-on: ubuntu-latest | ||
# defaults: | ||
# run: | ||
# shell: bash | ||
# working-directory: ./terraform | ||
# steps: | ||
# - name: Checkout source code | ||
# uses: actions/checkout@v4 | ||
# - name: Setup TFLint | ||
# uses: terraform-linters/setup-tflint@v4 | ||
# with: | ||
# tflint_version: v0.52.0 | ||
# - name: Show version | ||
# run: tflint --version | ||
# - name: Init TFLint | ||
# run: tflint --init | ||
# - name: Run TFLint | ||
# run: tflint -f compact |