|
14 | 14 | RUN_TMATE: ${{ secrets.RUN_TMATE }} |
15 | 15 |
|
16 | 16 | jobs: |
| 17 | + diagnostics: |
| 18 | + name: Run diagnostics |
| 19 | + runs-on: ubuntu-latest |
| 20 | + steps: |
| 21 | + # Note that a duplicate of this step must be added at the top of |
| 22 | + # each job. |
| 23 | + - id: harden-runner |
| 24 | + name: Harden the runner |
| 25 | + uses: step-security/harden-runner@v2 |
| 26 | + with: |
| 27 | + egress-policy: audit |
| 28 | + - id: github-status |
| 29 | + name: Check GitHub status |
| 30 | + uses: crazy-max/ghaction-github-status@v3 |
| 31 | + - id: dump-context |
| 32 | + name: Dump context |
| 33 | + uses: crazy-max/ghaction-dump-context@v2 |
17 | 34 | lint: |
| 35 | + needs: |
| 36 | + - diagnostics |
18 | 37 | runs-on: ubuntu-latest |
19 | 38 | steps: |
| 39 | + - id: harden-runner |
| 40 | + name: Harden the runner |
| 41 | + uses: step-security/harden-runner@v2 |
| 42 | + with: |
| 43 | + egress-policy: audit |
20 | 44 | - id: setup-env |
21 | 45 | uses: cisagov/setup-env-github-action@develop |
22 | | - - uses: actions/checkout@v3 |
| 46 | + - uses: actions/checkout@v4 |
23 | 47 | - id: setup-python |
24 | 48 | uses: actions/setup-python@v4 |
25 | 49 | with: |
@@ -84,11 +108,26 @@ jobs: |
84 | 108 | - uses: hashicorp/setup-terraform@v2 |
85 | 109 | with: |
86 | 110 | terraform_version: ${{ steps.setup-env.outputs.terraform-version }} |
| 111 | + - name: Install go-critic |
| 112 | + env: |
| 113 | + PACKAGE_URL: github.com/go-critic/go-critic/cmd/gocritic |
| 114 | + PACKAGE_VERSION: ${{ steps.setup-env.outputs.go-critic-version }} |
| 115 | + run: go install ${PACKAGE_URL}@${PACKAGE_VERSION} |
| 116 | + - name: Install gosec |
| 117 | + env: |
| 118 | + PACKAGE_URL: github.com/securego/gosec/v2/cmd/gosec |
| 119 | + PACKAGE_VERSION: ${{ steps.setup-env.outputs.gosec-version }} |
| 120 | + run: go install ${PACKAGE_URL}@${PACKAGE_VERSION} |
87 | 121 | - name: Install shfmt |
88 | 122 | env: |
89 | 123 | PACKAGE_URL: mvdan.cc/sh/v3/cmd/shfmt |
90 | 124 | PACKAGE_VERSION: ${{ steps.setup-env.outputs.shfmt-version }} |
91 | 125 | run: go install ${PACKAGE_URL}@${PACKAGE_VERSION} |
| 126 | + - name: Install staticcheck |
| 127 | + env: |
| 128 | + PACKAGE_URL: honnef.co/go/tools/cmd/staticcheck |
| 129 | + PACKAGE_VERSION: ${{ steps.setup-env.outputs.staticcheck-version }} |
| 130 | + run: go install ${PACKAGE_URL}@${PACKAGE_VERSION} |
92 | 131 | - name: Install Terraform-docs |
93 | 132 | env: |
94 | 133 | PACKAGE_URL: github.com/terraform-docs/terraform-docs |
|
0 commit comments