Skip to content

Update main.yml

Update main.yml #15

Workflow file for this run

name: Build
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
jobs:
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Install TFLint
run: |
curl -sSL https://raw.githubusercontent.com/terraform-linters/tflint/master/install_linux.sh | bash
tflint --version
- name: Run TFLint and generate report
run: |
tflint --format json --out tflint-report.json
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: c4e60658667dddab155712f813caebae221c266d
SONAR_PROJECT_KEY: ravisanchala_testingscanner
SONAR_ORGANIZATION: ravisanchala
SONAR_TERRAFORM_TFLINT_REPORT_PATHS: ./tflint-report.json
- name: Show TFLint Report
run: |
cat tflint-report.json