-
Notifications
You must be signed in to change notification settings - Fork 41
43 lines (36 loc) · 1.32 KB
/
pr-test-build.yml
File metadata and controls
43 lines (36 loc) · 1.32 KB
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
43
name: Build » Test build
on:
push:
branches-ignore:
- 'dependabot/**'
pull_request:
env:
NODE_VERSION: 24
jobs:
check-npm-build:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v5
- name: Ensure our node version matches the main repo's version
if: github.event_name == 'pull_request'
run: |
[[ "$(curl -s https://raw.githubusercontent.com/opencast/opencast/refs/heads/${{ github.base_ref }}/pom.xml | \
grep node.version | grep -Eo 'v[0-9.]+' | cut -f 1 -d '.' | cut -c 2-)" == "$NODE_VERSION" ]] \
&& exit 0 \
|| (echo "Node version does not match"; exit 1)
- name: Ensure our node version matches the main repo's version
if: github.event_name == 'push'
run: |
[[ "$(curl -s https://raw.githubusercontent.com/opencast/opencast/refs/heads/${{ github.ref_name }}/pom.xml | \
grep node.version | grep -Eo 'v[0-9.]+' | cut -f 1 -d '.' | cut -c 2-)" == "$NODE_VERSION" ]] \
&& exit 0 \
|| (echo "Node version does not match"; exit 1)
- name: Get Node.js
uses: actions/setup-node@v5
with:
node-version: $NODE_VERSION
- name: Run npm ci
run: npm ci
- name: Build the app
run: npm run build