[chore] Fix failing lint #65
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Linter | |
on: | |
push: | |
branches: | |
- "master" | |
paths: | |
- "cmd/**" | |
- "internal/**" | |
pull_request: | |
branches: | |
- "master" | |
paths: | |
- "cmd/**" | |
- "internal/**" | |
workflow_dispatch: | |
inputs: | |
logLevel: | |
description: "Log level" | |
required: true | |
default: "warning" | |
jobs: | |
golangci: | |
name: golangci-lint | |
if: github.repository == 'meshery/helm-kanvas-snapshot' | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: "1.21" | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
version: v1.59 | |
working-directory: cmd/kanvas-snapshot | |
args: --timeout 10m --verbose | |
skip-cache: true | |
build: | |
name: Build | |
if: github.repository == 'meshery/helm-kanvas-snapshot' | |
runs-on: macos-latest | |
needs: [golangci] | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Unshallow | |
run: git fetch --prune --unshallow | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "1.21" | |
- name: Setup Cache | |
uses: actions/cache@v4 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: goreleaser WITHOUT tag | |
uses: goreleaser/goreleaser-action@v6 | |
if: success() && startsWith(github.ref, 'refs/tags/') == false | |
env: | |
RELEASE_CHANNEL: "edge" | |
PROVIDER_TOKEN: ${{ secrets.PROVIDER_TOKEN }} | |
with: | |
version: 2 | |
args: release --snapshot --skip publish --clean -f .github/.goreleaser.yml |