|
| 1 | +--- |
| 2 | +name: pull request |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + |
| 6 | +jobs: |
| 7 | + # TODO: #22 add job using https://github.com/reviewdog/action-alex |
| 8 | + pre-commit: |
| 9 | + runs-on: ubuntu-latest |
| 10 | + steps: |
| 11 | + - uses: actions/checkout@v2 |
| 12 | + - name: Set up Python |
| 13 | + uses: actions/setup-python@v2 |
| 14 | + - name: Install prerequisites |
| 15 | + run: ./bin/install-ubuntu.sh |
| 16 | + - name: initialize Terraform |
| 17 | + run: terraform init --backend=false |
| 18 | + - name: pre-commit |
| 19 | + uses: pre-commit/[email protected] |
| 20 | + env: |
| 21 | + AWS_DEFAULT_REGION: us-east-1 |
| 22 | + # many of these are covered by better reviewdog linters below |
| 23 | + SKIP: >- |
| 24 | + terraform_tflint_deep, |
| 25 | + no-commit-to-branch, |
| 26 | + terraform_tflint_nocreds, |
| 27 | + terraform_trivy |
| 28 | + tflint: |
| 29 | + runs-on: ubuntu-latest |
| 30 | + steps: |
| 31 | + - uses: actions/checkout@v2 |
| 32 | + - name: Install prerequisites |
| 33 | + run: ./bin/install-ubuntu.sh |
| 34 | + - name: Terraform init |
| 35 | + run: terraform init --backend=false |
| 36 | + - name: tflint |
| 37 | + uses: reviewdog/action-tflint@master |
| 38 | + with: |
| 39 | + github_token: ${{ secrets.GITHUB_TOKEN }} |
| 40 | + reporter: github-pr-check |
| 41 | + filter_mode: added |
| 42 | + flags: --module |
| 43 | + level: error |
| 44 | + trivy: |
| 45 | + runs-on: ubuntu-latest |
| 46 | + steps: |
| 47 | + - uses: actions/checkout@v2 |
| 48 | + - name: Install prerequisites |
| 49 | + run: ./bin/install-ubuntu.sh |
| 50 | + - name: Terraform init |
| 51 | + run: terraform init --backend=false |
| 52 | + - name: tfsec |
| 53 | + uses: reviewdog/action-tfsec@master |
| 54 | + with: |
| 55 | + github_token: ${{ secrets.GITHUB_TOKEN }} |
| 56 | + reporter: github-pr-check |
| 57 | + filter_mode: added |
| 58 | + level: warning |
| 59 | + misspell: |
| 60 | + runs-on: ubuntu-latest |
| 61 | + steps: |
| 62 | + - uses: actions/checkout@v2 |
| 63 | + - name: misspell |
| 64 | + uses: reviewdog/action-misspell@v1 |
| 65 | + with: |
| 66 | + github_token: ${{ secrets.GITHUB_TOKEN }} |
| 67 | + locale: "US" |
| 68 | + reporter: github-pr-check |
| 69 | + filter_mode: added |
| 70 | + level: error |
| 71 | + yamllint: |
| 72 | + runs-on: ubuntu-latest |
| 73 | + steps: |
| 74 | + - uses: actions/checkout@v2 |
| 75 | + - name: yamllint |
| 76 | + uses: reviewdog/action-yamllint@v1 |
| 77 | + with: |
| 78 | + github_token: ${{ secrets.GITHUB_TOKEN }} |
| 79 | + reporter: github-pr-check |
| 80 | + filter_mode: added |
| 81 | + level: error |
0 commit comments