fix: update vulnerable packages #312
This file contains 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: CDN CI | |
on: | |
pull_request: | |
paths: | |
- cdn-server/**/* | |
- .github/workflows/cdn-ci.yaml | |
concurrency: | |
group: ${{github.workflow}}-${{github.head_ref}} | |
cancel-in-progress: true | |
env: | |
CI: true | |
DO_NOT_TRACK: '1' | |
jobs: | |
build_test: | |
timeout-minutes: 10 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/node | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Build | |
run: pnpm run --filter ./cdn-server --filter ./cdn-server/cdn build | |
- name: Lint | |
run: pnpm run --filter ./cdn-server --filter ./cdn-server/cdn lint | |
- name: Test | |
run: pnpm run --filter ./cdn-server/cdn test | |
build_push_image: | |
# This is a limitation of GitHub. Only organization members can push to GitHub Container Registry | |
# For now, we will disable the push to the GitHub Container Registry for external contributors | |
if: github.event.pull_request.head.repo.full_name == github.repository | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/build-push-image | |
with: | |
docker_username: ${{secrets.DOCKER_USERNAME}} | |
docker_password: ${{secrets.DOCKER_PASSWORD}} | |
docker_context: . | |
dockerfile: cdn-server/Dockerfile | |
token: ${{secrets.GITHUB_TOKEN}} | |
image_name: cdn | |
image_description: "Cosmo CDN Server" | |