fix(build): use dynamic env for CDN API key #222
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 | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| defaults: | |
| run: | |
| working-directory: resolution-frontend | |
| jobs: | |
| typecheck: | |
| name: Typecheck | |
| runs-on: ubuntu-latest | |
| env: | |
| HACK_CLUB_CDN_API_KEY: ${{ github.event_name == 'pull_request' && 'placeholder-key' || secrets.HACK_CLUB_CDN_API_KEY }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: oven-sh/setup-bun@v2 | |
| - run: bun install --frozen-lockfile | |
| - run: bun run check | |
| test: | |
| name: Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: oven-sh/setup-bun@v2 | |
| - run: bun install --frozen-lockfile | |
| - run: bun test --coverage | |
| security: | |
| name: Security Audit | |
| runs-on: ubuntu-latest | |
| continue-on-error: true | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: oven-sh/setup-bun@v2 | |
| - run: bun install --frozen-lockfile | |
| - run: bun audit --audit-level=critical | |
| build: | |
| name: Build | |
| needs: [typecheck, test] | |
| runs-on: ubuntu-latest | |
| env: | |
| HACK_CLUB_CDN_API_KEY: ${{ github.event_name == 'pull_request' && 'placeholder-key' || secrets.HACK_CLUB_CDN_API_KEY }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: oven-sh/setup-bun@v2 | |
| - run: bun install --frozen-lockfile | |
| - run: bun run build | |