chore(gh): use GitHub cli for creating releases #240
Workflow file for this 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
name: "static analysis" | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
jobs: | |
validate: | |
name: validate | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
terraform: [ ~1.7 ] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.tflint.d/plugins | |
key: ${{ matrix.os }}-tflint-${{ hashFiles('.tflint.hcl') }} | |
- uses: hashicorp/setup-terraform@v3 | |
with: | |
terraform_version: ${{ matrix.terraform }} | |
- uses: terraform-linters/setup-tflint@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
- run: make fmt | |
- run: make validate | |
- run: make tflint | |
- name: trivy config | |
run: | | |
cat >> ./trivy.yaml << EOF | |
# see https://aquasecurity.github.io/trivy/latest/docs/references/configuration/config-file/ for reference | |
exit-code: 1 | |
exit-on-eol: 1 | |
misconfiguration: | |
terraform: | |
exclude-downloaded-modules: true | |
severity: | |
- HIGH | |
- CRITICAL | |
scan: | |
skip-dirs: | |
- "**/.terraform/**/*" | |
EOF | |
cat ./trivy.yaml | |
- uses: aquasecurity/[email protected] | |
with: | |
scan-type: 'config' | |
hide-progress: false | |
trivy-config: trivy.yaml |