Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .github/workflows/deploy-main-branches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/pr-deploy-test-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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
Expand Down
20 changes: 19 additions & 1 deletion .github/workflows/pr-test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,35 @@ on:
- '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: 20
node-version: $NODE_VERSION

- name: Run npm ci
run: npm ci
Expand Down
4 changes: 1 addition & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
<properties>
<opencast.basedir>${project.basedir}/../..</opencast.basedir>
<checkstyle.skip>false</checkstyle.skip>
<nodejs.version>v20.10.0</nodejs.version>
<!--<ui.include.resource>/admin-ui=-build/</ui.include.resource>-->
</properties>
<profiles>
<profile>
Expand Down Expand Up @@ -101,7 +99,7 @@
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<configuration>
<nodeVersion>${nodejs.version}</nodeVersion>
<nodeVersion>${node.version}</nodeVersion>
<installDirectory>target</installDirectory>
<environmentVariables>
<PUBLIC_URL>/admin-ui</PUBLIC_URL>
Expand Down
Loading