Fix use of NODE_VERSION variable #2
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: PRs » Build Pull Request Page | |
| on: | |
| pull_request: | |
| types: | |
| - opened | |
| - synchronize | |
| concurrency: | |
| group: pull-request-page | |
| cancel-in-progress: false | |
| env: | |
| NODE_VERSION: 24 | |
| jobs: | |
| detect-repo-owner: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| server: ${{ steps.test-server.outputs.server }} | |
| branch: ${{ steps.branch-name.outputs.branch }} | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v5 | |
| - name: Determine the correct test server | |
| id: test-server | |
| run: echo "server=https://`./.github/get-release-server.sh ${{ github.ref_name }}`" >> $GITHUB_OUTPUT | |
| - name: Determine branch name | |
| id: branch-name | |
| run: | | |
| #Temp becomes something like r/17.x | |
| export TEMP=${{ github.ref_name }} | |
| #Strip the r/ prefix, giving us just 17.x. If this is main/develop this does nothing | |
| echo "branch=${TEMP#r\/}" >> $GITHUB_OUTPUT | |
| build-pr: | |
| runs-on: ubuntu-latest | |
| needs: detect-repo-owner | |
| steps: | |
| - name: Generate build path | |
| run: echo "build=${{github.event.number}}/$(date +%Y-%m-%d_%H-%M-%S)/" >> $GITHUB_OUTPUT | |
| id: build-path | |
| - name: Checkout sources | |
| uses: actions/checkout@v5 | |
| - name: Get Node.js | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| - name: Run npm ci | |
| run: npm ci | |
| - name: Build the app | |
| run: | | |
| npm run build | |
| mkdir -p admin-interface-test/${{ steps.build-path.outputs.build }} | |
| mv build/* admin-interface-test/${{ steps.build-path.outputs.build }}/ | |
| tar cf ${{ runner.temp }}/build.tar admin-interface-test | |
| env: | |
| VITE_TEST_SERVER_URL: ${{needs.detect-repo-owner.outputs.server}} | |
| NODE_ENV: development | |
| VITE_TEST_SERVER_AUTH: "admin:opencast" | |
| - name: Upload build to GHA | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: build | |
| path: ${{ runner.temp }}/build.tar | |
| check-no-modified-translations: | |
| name: Translations only via Crowdin | |
| if: github.repository_owner == 'opencast' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Sources | |
| uses: actions/checkout@v4 | |
| - name: Get changed locale files | |
| uses: dorny/paths-filter@v3 | |
| id: filter_locales | |
| with: | |
| filters: | # !(pattern) matches anything but pattern | |
| locales: | |
| - 'src/i18n/org/opencastproject/adminui/languages/!lang-(en_US)*.json' | |
| - name: Check for changes in translations | |
| if: steps.filter_locales.outputs.locales == true | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| core.setFailed('You should not alter translations outside of Crowdin.') |