chore(security.txt): make it RFC 9116 compliant and redirect /security.txt #35773
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: CI | |
| # Security: Do not replace `pull_request` with `pull_request_target` to expose secrets or | |
| # GITHUB_TOKEN write access to PR code. pull_request_target runs untrusted fork PR code with | |
| # base-branch privileges. | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| types: | |
| - opened | |
| - synchronize | |
| - reopened | |
| env: | |
| TZ: UTC | |
| OC_ENV: ci | |
| NODE_ENV: test | |
| WEBSITE_URL: http://localhost:3000 | |
| API_URL: http://localhost:3060 | |
| PDF_SERVICE_URL: http://localhost:3002 | |
| API_KEY: dvl-1510egmf4a23d80342403fb599qd | |
| CI: true | |
| DISABLE_MOCK_UPLOADS: 1 | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Setup project | |
| uses: ./.github/actions/setup-project | |
| with: | |
| CACHE_VERSION: ${{ secrets.CACHE_VERSION }} | |
| - run: npm run lint:quiet | |
| prettier: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Setup project | |
| uses: ./.github/actions/setup-project | |
| with: | |
| CACHE_VERSION: ${{ secrets.CACHE_VERSION }} | |
| - run: npm run prettier:check | |
| depcheck: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Setup project | |
| uses: ./.github/actions/setup-project | |
| with: | |
| CACHE_VERSION: ${{ secrets.CACHE_VERSION }} | |
| - run: npm run depcheck | |
| ts-unused-exports: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Setup project | |
| uses: ./.github/actions/setup-project | |
| with: | |
| CACHE_VERSION: ${{ secrets.CACHE_VERSION }} | |
| - run: npm run ts-unused-exports | |
| check-langs: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Setup project | |
| uses: ./.github/actions/setup-project | |
| with: | |
| CACHE_VERSION: ${{ secrets.CACHE_VERSION }} | |
| - run: npm run langs:check | |
| build: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Setup project | |
| uses: ./.github/actions/setup-project | |
| with: | |
| CACHE_VERSION: ${{ secrets.CACHE_VERSION }} | |
| - name: Restore NextJS build cache | |
| uses: actions/cache@v6 | |
| with: | |
| path: .next/cache | |
| # Generate a new cache whenever packages or source files change | |
| key: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }} | |
| # If source files changed but packages didn't, rebuild from a prior cache | |
| restore-keys: | | |
| ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }} | |
| ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-nextjs-${{ hashFiles('**/package-lock.json') }}- | |
| ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-nextjs- | |
| - name: Build | |
| run: PRESERVE_NEXT_CACHE=true npm run build | |
| - name: Save NextJS build | |
| uses: actions/cache@v6 | |
| with: | |
| path: .next | |
| key: ${{ runner.os }}-next-build-${{ github.sha }} | |
| test: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Setup project | |
| uses: ./.github/actions/setup-project | |
| with: | |
| CACHE_VERSION: ${{ secrets.CACHE_VERSION }} | |
| - run: npm run test:coverage | |
| - name: Report coverage | |
| if: ${{ !cancelled() }} | |
| uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| flags: GraphQL | |
| - name: Upload test results to Codecov | |
| uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| typescript: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Setup project | |
| uses: ./.github/actions/setup-project | |
| with: | |
| CACHE_VERSION: ${{ secrets.CACHE_VERSION }} | |
| - run: npm run type:check | |
| e2e: | |
| needs: build | |
| uses: ./.github/workflows/e2e.yml | |
| secrets: inherit |