mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 17:08:53 +00:00
* Do not use golangci action for better reproducibility * Add fix to trigger build * Fix all reported issues * fix more lint errors * Add missing import * Remove unused method * Remove change not necessary
36 lines
No EOL
921 B
YAML
36 lines
No EOL
921 B
YAML
name: golangci-lint
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- patch-*
|
|
paths:
|
|
- '**.go'
|
|
pull_request:
|
|
paths:
|
|
- '**.go'
|
|
workflow_dispatch: # Manual
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
golangci:
|
|
permissions:
|
|
contents: read # for actions/checkout to fetch code
|
|
pull-requests: read # for actions/checkout to fetch pull requests
|
|
name: lint
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2
|
|
|
|
- uses: actions/setup-go@b22fbbc2921299758641fab08929b4ac52b32923
|
|
with:
|
|
go-version: '1.17'
|
|
|
|
- name: Run go lint
|
|
run: |
|
|
# The following packages are needed to build Fleet Desktop on Ubuntu.
|
|
sudo apt install -y gcc libgtk-3-dev libayatana-appindicator3-dev
|
|
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.46.2
|
|
make lint-go |