diff --git a/.github/workflows/deploy-main-branches.yml b/.github/workflows/deploy-main-branches.yml index e7233dff3..58a659af7 100644 --- a/.github/workflows/deploy-main-branches.yml +++ b/.github/workflows/deploy-main-branches.yml @@ -53,7 +53,7 @@ jobs: node-version: ${{ env.NODE_VERSION }} - 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) + 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 -o pom.xml export FOUND_VERSION="$(grep node.version pom.xml | grep -Eo 'v[0-9.]+' | cut -f 1 -d '.' | cut -c 2-)" diff --git a/.github/workflows/pr-test-build.yml b/.github/workflows/pr-test-build.yml index af8c4e746..d94b37d8a 100644 --- a/.github/workflows/pr-test-build.yml +++ b/.github/workflows/pr-test-build.yml @@ -34,7 +34,7 @@ jobs: && exit 0 \ || (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) + 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 -o pom.xml export FOUND_VERSION="$(grep node.version pom.xml | grep -Eo 'v[0-9.]+' | cut -f 1 -d '.' | cut -c 2-)" diff --git a/.github/workflows/pr-test-playwright.yml b/.github/workflows/pr-test-playwright.yml index 80c4dbcc5..c0bdad100 100644 --- a/.github/workflows/pr-test-playwright.yml +++ b/.github/workflows/pr-test-playwright.yml @@ -26,22 +26,22 @@ jobs: with: node-version: ${{ env.NODE_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 -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. 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 -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. Expected $NODE_VERSION, found $FOUND_VERSION"; exit 1) + - 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 -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. 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 -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. Expected $NODE_VERSION, found $FOUND_VERSION"; exit 1) - name: Install dependencies run: npm ci