Files
storage/.github/workflows/golangci-lint.yml
2023-11-15 07:50:48 -05:00

48 lines
1.1 KiB
YAML

name: Golangci Lint Check
on:
push:
branches:
- "master"
- "main"
paths-ignore:
- "**.md"
- LICENSE
- ".github/ISSUE_TEMPLATE/*.yml"
- ".github/dependabot.yml"
pull_request:
branches:
- "*"
paths-ignore:
- "**.md"
- LICENSE
- ".github/ISSUE_TEMPLATE/*.yml"
- ".github/dependabot.yml"
jobs:
prepare-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Fetch Repository
uses: actions/checkout@v4
- id: set-matrix
run: |
echo "::set-output name=matrix::$(find . -type d -not -path '*/\.*' | jq -R -s -c 'split("\n")[:-1]')"
golangci-lint:
needs: prepare-matrix
runs-on: ubuntu-latest
strategy:
matrix:
directory: ${{fromJson(needs.prepare-matrix.outputs.matrix)}}
steps:
- name: Fetch Repository
uses: actions/checkout@v4
- name: Run golangci-lint
uses: reviewdog/action-golangci-lint@v2
with:
golangci_lint_flags: "--tests=false"
working-directory: ${{ matrix.directory }}