mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-02-15 04:40:15 +00:00
ci/cd: run linter only on backend changes
This commit is contained in:
47
.github/workflows/backend-linter.yml
vendored
47
.github/workflows/backend-linter.yml
vendored
@@ -1,12 +1,15 @@
|
|||||||
name: Run Backend Linter
|
name: Run Backend Linter
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches: [main]
|
||||||
- main
|
paths:
|
||||||
pull_request:
|
- "backend/**"
|
||||||
branches:
|
pull_request:
|
||||||
- main
|
branches: [main]
|
||||||
|
paths:
|
||||||
|
- "backend/**"
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
# Required: allow read access to the content for analysis.
|
# Required: allow read access to the content for analysis.
|
||||||
contents: read
|
contents: read
|
||||||
@@ -16,21 +19,21 @@ permissions:
|
|||||||
checks: write
|
checks: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
golangci-lint:
|
golangci-lint:
|
||||||
name: Run Golangci-lint
|
name: Run Golangci-lint
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v4
|
uses: actions/setup-go@v4
|
||||||
with:
|
with:
|
||||||
go-version-file: backend/go.mod
|
go-version-file: backend/go.mod
|
||||||
|
|
||||||
- name: Run Golangci-lint
|
- name: Run Golangci-lint
|
||||||
uses: golangci/golangci-lint-action@55c2c1448f86e01eaae002a5a3a9624417608d84 # v6.5.2
|
uses: golangci/golangci-lint-action@55c2c1448f86e01eaae002a5a3a9624417608d84 # v6.5.2
|
||||||
with:
|
with:
|
||||||
version: v1.64
|
version: v1.64
|
||||||
working-directory: backend
|
working-directory: backend
|
||||||
only-new-issues: ${{ github.event_name == 'pull_request' }}
|
only-new-issues: ${{ github.event_name == 'pull_request' }}
|
||||||
|
|||||||
Reference in New Issue
Block a user