mirror of
https://github.com/filebrowser/filebrowser.git
synced 2025-05-08 11:22:10 +00:00
ci: add pr lint workflow (#3157)
This commit is contained in:
parent
0e0b0c8095
commit
e39ea73095
12
.github/workflows/main.yaml
vendored
12
.github/workflows/main.yaml
vendored
@ -26,19 +26,9 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
go-version: 1.22.1
|
go-version: 1.22.1
|
||||||
- run: make lint-backend
|
- run: make lint-backend
|
||||||
lint-commits:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
- uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: '18'
|
|
||||||
- run: make lint-commits
|
|
||||||
lint:
|
lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [lint-frontend, lint-backend, lint-commits]
|
needs: [lint-frontend, lint-backend]
|
||||||
steps:
|
steps:
|
||||||
- run: echo "done"
|
- run: echo "done"
|
||||||
|
|
||||||
|
21
.github/workflows/pr-lint.yaml
vendored
Normal file
21
.github/workflows/pr-lint.yaml
vendored
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
name: "Lint PR"
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request_target:
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
- reopened
|
||||||
|
- edited
|
||||||
|
- synchronize
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
pull-requests: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
main:
|
||||||
|
name: Validate PR title
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: amannn/action-semantic-pull-request@v5
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2
Makefile
2
Makefile
@ -27,7 +27,7 @@ test-backend: ## Run backend tests
|
|||||||
$Q $(go) test -v ./...
|
$Q $(go) test -v ./...
|
||||||
|
|
||||||
.PHONY: lint
|
.PHONY: lint
|
||||||
lint: lint-frontend lint-backend lint-commits ## Run all linters
|
lint: lint-frontend lint-backend ## Run all linters
|
||||||
|
|
||||||
.PHONY: lint-frontend
|
.PHONY: lint-frontend
|
||||||
lint-frontend: ## Run frontend linters
|
lint-frontend: ## Run frontend linters
|
||||||
|
Loading…
x
Reference in New Issue
Block a user