Skip to content
Open
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
21 changes: 12 additions & 9 deletions .github/workflows/pr-test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,23 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v5

- name: Ensure our node version matches the main repo's version
- name: Ensure our node version matches the main repo's version for pull requests
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" ]] \
curl -s https://raw.githubusercontent.com/opencast/opencast/refs/heads/${{ github.base_ref }}/pom.xml -o pom.xml
export FOUND_VERSION="$(grep node.version pom.xml | grep -Eo 'v[0-9.]+' | cut -f 1 -d '.' | cut -c 2-)"
[[ "$FOUND_VERSION" == "$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'
|| (echo "Node version does not match. Expected $NODE_VERSION, found $FOUND_VERSION"; exit 1)

- name: Ensure our node version matches the main repo's version for push events
if: github.event_name == 'push' && (startsWith("r/", github.ref_name) || "develop" == github.ref_name)
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" ]] \
curl -s https://raw.githubusercontent.com/opencast/opencast/refs/heads/${{ github.ref_name }}/pom.xml -o pom.xml
export FOUND_VERSION="$(grep node.version pom.xml | grep -Eo 'v[0-9.]+' | cut -f 1 -d '.' | cut -c 2-)"
[[ "$FOUND_VERSION" == "$NODE_VERSION" ]] \
&& exit 0 \
|| (echo "Node version does not match"; exit 1)
|| (echo "Node version does not match. Expected $NODE_VERSION, found $FOUND_VERSION"; exit 1)

- name: Get Node.js
uses: actions/setup-node@v5
Expand Down
Loading