- This action assumes the user will have the terraform.tfstate file in the repo and doesn't needs terraform initialization.
- Action creates Mock cloudfix recommendations.
- The generated mock cloudfix recommendations are then put as comments in the repo.
on:
pull_request:
runs:
using: composite
steps:
- name: Checkout
uses: actions/checkout@v3
with:
repository: trilogy-group/cloudfix-linter-github-action
path: mainRepo
- name: Comment Reccomendation
id: prcomment
env:
GH_TOKEN: ${{ inputs.GITHUB_TOKEN }}
CLOUDFIX_USERNAME: ${{ inputs.cloudfix_username }}
CLOUDFIX_PASSWORD: ${{ inputs.cloudfix_password }}
ENABLE_MOCK_RECOMMENDATION: "${{ inputs.mock_recommendations }}"
TERRAFORM_BINARY_PATH: ${{ inputs.terraform_binary_path }}
pr_number: ${{ inputs.pr_number }}
repository: ${{ inputs.repository }}
run: echo $ENABLE_MOCK_RECOMMENDATION; sh mainRepo/script.sh
shell: bash
- Checking out current repo using checkout action in $GITHUB_WORKSPACE under mainRepo name.
- Creating recommendatiions by running the script.sh script
- Generating mock recommandations via script (The tf.show file should be present to create recommendations)
- Installing tflint and cloudfix-linter
- Initializing cloudfix-linter
- Putting recommendations over the resources
- Making comments from the recommendations