|
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:
|
@@ -80,11 +104,26 @@ jobs:
|
80 | 104 | - uses: hashicorp/setup-terraform@v2
|
81 | 105 | with:
|
82 | 106 | terraform_version: ${{ steps.setup-env.outputs.terraform-version }}
|
| 107 | + - name: Install go-critic |
| 108 | + env: |
| 109 | + PACKAGE_URL: github.com/go-critic/go-critic/cmd/gocritic |
| 110 | + PACKAGE_VERSION: ${{ steps.setup-env.outputs.go-critic-version }} |
| 111 | + run: go install ${PACKAGE_URL}@${PACKAGE_VERSION} |
| 112 | + - name: Install gosec |
| 113 | + env: |
| 114 | + PACKAGE_URL: github.com/securego/gosec/v2/cmd/gosec |
| 115 | + PACKAGE_VERSION: ${{ steps.setup-env.outputs.gosec-version }} |
| 116 | + run: go install ${PACKAGE_URL}@${PACKAGE_VERSION} |
83 | 117 | - name: Install shfmt
|
84 | 118 | env:
|
85 | 119 | PACKAGE_URL: mvdan.cc/sh/v3/cmd/shfmt
|
86 | 120 | PACKAGE_VERSION: ${{ steps.setup-env.outputs.shfmt-version }}
|
87 | 121 | run: go install ${PACKAGE_URL}@${PACKAGE_VERSION}
|
| 122 | + - name: Install staticcheck |
| 123 | + env: |
| 124 | + PACKAGE_URL: honnef.co/go/tools/cmd/staticcheck |
| 125 | + PACKAGE_VERSION: ${{ steps.setup-env.outputs.staticcheck-version }} |
| 126 | + run: go install ${PACKAGE_URL}@${PACKAGE_VERSION} |
88 | 127 | - name: Install Terraform-docs
|
89 | 128 | env:
|
90 | 129 | PACKAGE_URL: github.com/terraform-docs/terraform-docs
|
|
0 commit comments