Skip to content

[WIP] [CI:DOCS] GHA: Add staticcheck workflow #1

[WIP] [CI:DOCS] GHA: Add staticcheck workflow

[WIP] [CI:DOCS] GHA: Add staticcheck workflow #1

Workflow file for this run

---
name: "Golang Static Check"
on: ["push", "pull_request"]
permissions:
contents: read-all
jobs:
static_check:
name: "Golang Static Check"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
# try to limit PR surprises by installing the project's minimum go verison
- id: gomod
run: |
printf "version=%s" $(grep -Em1 '^go' go.mod | awk '{print $2}') >> $GITHUB_ENV

Check failure on line 21 in .github/workflows/staticcheck.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/staticcheck.yml

Invalid workflow file

You have an error in your yaml syntax on line 21
- uses: WillAbides/setup-go-faster@v1.7.0
with:
go-version: "^${{ steps.gomod.outputs.version }}"
ignore-local: "true"
# Ref: https://staticcheck.dev/docs/running-staticcheck/ci/github-actions/
- uses: dominikh/staticcheck-action@v1.2.0
with:
# Renovate manages this value, manual changes are permitted if required.
version: "2023.1.3"
# Don't make suggestions for go versions older than the minimum
min-go-version: "${{ steps.gomod.outputs.version }}"