-
Notifications
You must be signed in to change notification settings - Fork 105
55 lines (44 loc) · 1.25 KB
/
cdn-ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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
jobs:
build_test:
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- 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:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- 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"