From bdc8009971791a91cd965cd51505b1370661c3e7 Mon Sep 17 00:00:00 2001 From: Greg Logan Date: Tue, 5 May 2026 22:31:10 -0600 Subject: [PATCH 1/3] Using the parent pom's node version --- pom.xml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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 From c83771b50512666da1e55e12fe2933d98b8b1ec1 Mon Sep 17 00:00:00 2001 From: Greg Logan Date: Wed, 6 May 2026 10:17:23 -0600 Subject: [PATCH 2/3] Bumping node version, and ensuring that our version and the main parent version match --- .github/workflows/deploy-main-branches.yml | 10 +++++++++- .github/workflows/pr-deploy-test-branch.yml | 10 +++++++++- .github/workflows/pr-test-build.yml | 10 +++++++++- 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy-main-branches.yml b/.github/workflows/deploy-main-branches.yml index cd633c0fb4..7295495e61 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,15 @@ 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 || 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..5134d984eb 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,15 @@ 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.ref_name }}/pom.xml | \ + grep node.version | grep -Eo 'v[0-9.]+' | cut -f 1 -d '.' | cut -c 2-)" == "$NODE_VERSION" ]] && exit 0 || 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..d045558800 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,15 @@ 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 || 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 From c9c227edf8a7f57465b3db4fe459aa925f842919 Mon Sep 17 00:00:00 2001 From: Greg Logan Date: Wed, 6 May 2026 11:49:24 -0600 Subject: [PATCH 3/3] Special handline for push vs pull request --- .github/workflows/deploy-main-branches.yml | 4 +++- .github/workflows/pr-deploy-test-branch.yml | 6 ++++-- .github/workflows/pr-test-build.yml | 12 +++++++++++- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy-main-branches.yml b/.github/workflows/deploy-main-branches.yml index 7295495e61..3c95a225b2 100644 --- a/.github/workflows/deploy-main-branches.yml +++ b/.github/workflows/deploy-main-branches.yml @@ -50,7 +50,9 @@ jobs: - 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 || exit 1 + 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 diff --git a/.github/workflows/pr-deploy-test-branch.yml b/.github/workflows/pr-deploy-test-branch.yml index 5134d984eb..683ef0ca3b 100644 --- a/.github/workflows/pr-deploy-test-branch.yml +++ b/.github/workflows/pr-deploy-test-branch.yml @@ -55,8 +55,10 @@ jobs: - 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 || exit 1 + [[ "$(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 diff --git a/.github/workflows/pr-test-build.yml b/.github/workflows/pr-test-build.yml index d045558800..4ee04b614f 100644 --- a/.github/workflows/pr-test-build.yml +++ b/.github/workflows/pr-test-build.yml @@ -17,9 +17,19 @@ jobs: 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 || exit 1 + 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