Merge pull request #44 from PoliNetworkOrg/save_costs #205
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
name: Static Analysis Pre-Commit | |
on: | |
push: | |
workflow_dispatch: | |
jobs: | |
static_analysis: | |
runs-on: ubuntu-latest | |
env: | |
ARM_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} | |
ARM_CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }} | |
ARM_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }} | |
ARM_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Terraform | |
uses: hashicorp/setup-terraform@v1 | |
with: | |
cli_config_credentials_token: ${{ secrets.TF_API_TOKEN }} | |
terraform_version: 1.4.0 | |
- uses: actions/setup-go@v3 | |
- name: run_test | |
run: | | |
sudo apt install -y pre-commit gnupg software-properties-common | |
tflint -v || curl -s https://raw.githubusercontent.com/terraform-linters/tflint/master/install_linux.sh | bash | |
terraform-docs -v || go install github.com/terraform-docs/[email protected] | |
tfsec -v || go install github.com/aquasecurity/tfsec/cmd/tfsec@latest | |
export GOPATH=$HOME/go | |
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin | |
pre-commit run -a |