-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (36 loc) · 1.13 KB
/
backend.test.build.code.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: "backend:test:build test code"
on: push
jobs:
# only (but most important) job from this workflow required for pull requests
# check results serve as run conditions for all other jobs here
files-changed:
name: Detect File Changes - backend-test-build-code
runs-on: ubuntu-latest
outputs:
changes: ${{ steps.changes.outputs.backend-test-build-code }}
steps:
- uses: actions/checkout@v4
- name: Check for backend file changes
uses: dorny/[email protected]
id: changes
with:
token: ${{ github.token }}
filters: .github/file-filters.yml
list-files: shell
build:
if: needs.files-changed.outputs.changes == 'true'
name: Build - Backend
needs: files-changed
runs-on: ubuntu-latest
env:
WORKING_DIRECTORY: ./backend
steps:
- name: Set Node version
uses: actions/setup-node@v4
with:
node-version: '>=21'
- name: Checkout code
uses: actions/checkout@v4
- name: Backend | Build
run: npm install && npm run build
working-directory: ${{env.WORKING_DIRECTORY}}