ci: update CI workflows to include path filters #73
2 changed files with 13 additions and 0 deletions
|
@ -2,10 +2,15 @@ name: CI
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- 'backend/**'
|
||||||
|
- 'frontend/**'
|
||||||
|
- '.gitea/workflows/ci.yml'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
checkstyle:
|
checkstyle:
|
||||||
name: "Checkstyle Main"
|
name: "Checkstyle Main"
|
||||||
|
if: ${{ contains(github.event.pull_request.changed_files_json, 'backend/') || contains(github.event.pull_request.changed_files_json, '.gitea/workflows/ci.yml') }}
|
||||||
container:
|
container:
|
||||||
image: "cimg/openjdk:23.0-node"
|
image: "cimg/openjdk:23.0-node"
|
||||||
steps:
|
steps:
|
||||||
|
@ -32,6 +37,7 @@ jobs:
|
||||||
|
|
||||||
eslint:
|
eslint:
|
||||||
name: eslint
|
name: eslint
|
||||||
|
if: ${{ contains(github.event.pull_request.changed_files_json, 'frontend/') || contains(github.event.pull_request.changed_files_json, '.gitea/workflows/ci.yml') }}
|
||||||
container:
|
container:
|
||||||
image: catthehacker/ubuntu:act-latest
|
image: catthehacker/ubuntu:act-latest
|
||||||
steps:
|
steps:
|
||||||
|
@ -58,6 +64,7 @@ jobs:
|
||||||
|
|
||||||
prettier:
|
prettier:
|
||||||
name: prettier
|
name: prettier
|
||||||
|
if: ${{ contains(github.event.pull_request.changed_files_json, 'frontend/') || contains(github.event.pull_request.changed_files_json, '.gitea/workflows/ci.yml') }}
|
||||||
container:
|
container:
|
||||||
image: catthehacker/ubuntu:act-latest
|
image: catthehacker/ubuntu:act-latest
|
||||||
steps:
|
steps:
|
||||||
|
@ -84,6 +91,7 @@ jobs:
|
||||||
|
|
||||||
test-build:
|
test-build:
|
||||||
name: test-build
|
name: test-build
|
||||||
|
if: ${{ contains(github.event.pull_request.changed_files_json, 'frontend/') || contains(github.event.pull_request.changed_files_json, '.gitea/workflows/ci.yml') }}
|
||||||
container:
|
container:
|
||||||
image: catthehacker/ubuntu:act-latest
|
image: catthehacker/ubuntu:act-latest
|
||||||
steps:
|
steps:
|
||||||
|
|
|
@ -3,6 +3,11 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- "main"
|
- "main"
|
||||||
|
paths:
|
||||||
|
- 'backend/**'
|
||||||
|
- 'frontend/**'
|
||||||
|
- '.gitea/workflows/release.yml'
|
||||||
|
- 'release.config.cjs'
|
||||||
|
|
||||||
env:
|
env:
|
||||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue