fix: csp violation #1145
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: Validate Redirects | |
| on: | |
| pull_request: | |
| branches: [main] | |
| types: [opened, synchronize] | |
| env: | |
| BUILD_DIR: 'client/www/next-build' | |
| permissions: | |
| contents: read | |
| jobs: | |
| ValidateRedirects: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | |
| - name: Setup Node.js 20.x | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | |
| with: | |
| node-version: 20.x | |
| - name: Set Yarn Berry | |
| uses: ./.github/actions/set_yarn_berry | |
| - name: Install Dependencies | |
| run: yarn | |
| - name: Validate redirects | |
| id: redirects | |
| uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 | |
| with: | |
| result-encoding: string | |
| script: | | |
| const { invalidRedirects } = require('./.github/workflows/scripts/validate-redirects.js'); | |
| return await invalidRedirects(); | |
| - name: Fail if any invalid redirects have been found | |
| if: ${{ steps.redirects.outputs.result }} | |
| run: exit 1 && echo ${{ steps.redirects.outputs.result }} |