update workflows to trigger on path changes

This commit is contained in:
Arian Daneshvar
2025-04-16 11:02:22 -07:00
parent 0b27a4915b
commit 55c9ce6bc7
3 changed files with 40 additions and 22 deletions

View File

@@ -1,4 +1,4 @@
name: running build
name: backend jobs
on:
push:
@@ -7,12 +7,15 @@ on:
pull_request:
branches:
- main
paths: # comment this out if you are updating actions
- 'backend/**'
env:
CARGO_TERM_COLOR: always
jobs:
build-backend:
build:
runs-on: ubuntu-latest
container: rust:1.86-bullseye
defaults:
@@ -49,22 +52,3 @@ jobs:
- name: Ensure schema and query metadata are in sync
run: cargo sqlx prepare --check
lint-format-frontend:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./frontend
steps:
- uses: actions/checkout@v4
- name: Setup
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- run: npm ci
- run: npm run lint
- run: npm run check-format

34
.github/workflows/frontend.yml vendored Normal file
View File

@@ -0,0 +1,34 @@
name: frontend jobs
on:
push:
branches:
- main
pull_request:
branches:
- main
paths: # comment this out if you are updating actions and need to test
- 'frontend/**'
jobs:
check-lint-format:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./frontend
steps:
- uses: actions/checkout@v4
- run: git diff --name-status -- path/to/directory/
- name: Setup
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- run: npm ci
- run: npm run lint
- run: npm run check-format

View File

@@ -1,4 +1,4 @@
name: Publish container image
name: publish container image
on:
release: