Skip to content

workflows: add common Go linter, fix #21 #1

workflows: add common Go linter, fix #21

workflows: add common Go linter, fix #21 #1

Workflow file for this run

name: Go linter
on:
workflow_call:
inputs:
ref:
description: 'Ref to test [default: latest master; examples: 0a4ff9d3e4a9ab432fd5812eb18c98e03b5a7432'
required: false
default: ''
workdir:
description: 'Working directory'
required: false

Check failure on line 12 in .github/workflows/go-linter.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/go-linter.yml

Invalid workflow file

You have an error in your yaml syntax on line 12
default: '.'
jobs:
linter:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.ref }}
- name: Checkout .github repository
uses: actions/checkout@v4
with:
repository: nspcc-dev/.github
path: nspcc-gh
- uses: actions/setup-go@v5
with:
go-version-file: ${{ github.event.inputs.workdir }}/go.mod
cache-dependency-path: ${{ github.event.inputs.workdir }}/go.sum
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: latest
working-directory: ${{ github.event.inputs.workdir }}
args: --config=${{ github.workspace }}/nspcc-gh/.golangci.yml