diff --git a/.github/workflows/deploy-main-branches.yml b/.github/workflows/deploy-main-branches.yml
index cd633c0fb4..3c95a225b2 100644
--- a/.github/workflows/deploy-main-branches.yml
+++ b/.github/workflows/deploy-main-branches.yml
@@ -11,6 +11,9 @@ concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false
+env:
+ NODE_VERSION: 24
+
jobs:
detect-repo-owner:
name: Detect branch and appropriate server
@@ -44,10 +47,17 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v5
+ - name: Ensure our node version matches the main repo's version
+ 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: 20
+ node-version: $NODE_VERSION
- name: Run npm ci
run: npm ci
diff --git a/.github/workflows/pr-deploy-test-branch.yml b/.github/workflows/pr-deploy-test-branch.yml
index a534561288..683ef0ca3b 100644
--- a/.github/workflows/pr-deploy-test-branch.yml
+++ b/.github/workflows/pr-deploy-test-branch.yml
@@ -10,6 +10,9 @@ concurrency:
group: pull-request-page
cancel-in-progress: false
+env:
+ NODE_VERSION: 24
+
jobs:
detect-repo-owner:
if: github.repository_owner == 'opencast'
@@ -50,10 +53,17 @@ jobs:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
+ - name: Ensure our node version matches the main repo's version
+ 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: Get Node.js
uses: actions/setup-node@v5
with:
- node-version: 20
+ node-version: $NODE_VERSION
- name: Run npm ci
run: npm ci
diff --git a/.github/workflows/pr-test-build.yml b/.github/workflows/pr-test-build.yml
index d5e6165c61..4ee04b614f 100644
--- a/.github/workflows/pr-test-build.yml
+++ b/.github/workflows/pr-test-build.yml
@@ -6,6 +6,9 @@ on:
- 'dependabot/**'
pull_request:
+env:
+ NODE_VERSION: 24
+
jobs:
check-npm-build:
runs-on: ubuntu-latest
@@ -13,10 +16,25 @@ jobs:
- 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: 20
+ node-version: $NODE_VERSION
- name: Run npm ci
run: npm ci
diff --git a/pom.xml b/pom.xml
index 48a5324801..e04b4a616e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,8 +13,6 @@
${project.basedir}/../..
false
- v20.10.0
-
@@ -101,7 +99,7 @@
com.github.eirslett
frontend-maven-plugin
- ${nodejs.version}
+ ${node.version}
target
/admin-ui