File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ pull_request :
5+
6+ jobs :
7+ test-backend :
8+ runs-on : ubuntu-latest
9+ defaults :
10+ run :
11+ working-directory : apps/opencase
12+ steps :
13+ - uses : actions/checkout@v4
14+
15+ - uses : actions/setup-node@v4
16+ with :
17+ node-version : 22
18+ cache : npm
19+ cache-dependency-path : apps/opencase/package-lock.json
20+
21+ - run : npm ci
22+ - run : npm run lint
23+ - run : npm test
24+
25+ test-frontend :
26+ runs-on : ubuntu-latest
27+ defaults :
28+ run :
29+ working-directory : apps/editor
30+ steps :
31+ - uses : actions/checkout@v4
32+
33+ - uses : actions/setup-node@v4
34+ with :
35+ node-version : 22
36+ cache : npm
37+ cache-dependency-path : apps/editor/package-lock.json
38+
39+ - run : npm ci
40+ - run : npm run lint
41+ - run : npm test
42+
43+ build-images :
44+ runs-on : ubuntu-latest
45+ steps :
46+ - uses : actions/checkout@v4
47+
48+ - uses : docker/setup-buildx-action@v3
49+
50+ - name : Build opencase
51+ uses : docker/build-push-action@v6
52+ with :
53+ context : apps/opencase
54+ push : false
55+ cache-from : type=gha,scope=opencase
56+ cache-to : type=gha,scope=opencase,mode=max
57+
58+ - name : Build editor
59+ uses : docker/build-push-action@v6
60+ with :
61+ context : apps/editor
62+ push : false
63+ cache-from : type=gha,scope=editor
64+ cache-to : type=gha,scope=editor,mode=max
Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ on :
4+ push :
5+ branches : [main]
6+
7+ env :
8+ IMAGE_TAG : sha-${{ github.sha }}
9+
10+ jobs :
11+ build-and-push :
12+ runs-on : ubuntu-latest
13+ permissions :
14+ contents : read
15+ id-token : write
16+
17+ steps :
18+ - uses : actions/checkout@v4
19+
20+ - uses : google-github-actions/auth@v2
21+ with :
22+ workload_identity_provider : ${{ vars.GCP_WORKLOAD_IDENTITY_PROVIDER }}
23+ service_account : ${{ vars.GCP_SERVICE_ACCOUNT }}
24+
25+ - uses : docker/setup-buildx-action@v3
26+
27+ - name : Configure Docker for Artifact Registry
28+ run : gcloud auth configure-docker ${{ vars.ARTIFACT_REGISTRY_REGION }}-docker.pkg.dev --quiet
29+
30+ - name : Build and push opencase
31+ uses : docker/build-push-action@v6
32+ with :
33+ context : apps/opencase
34+ push : true
35+ tags : ${{ vars.IMAGE_REGISTRY }}/opencase:${{ env.IMAGE_TAG }}
36+ cache-from : type=gha,scope=opencase
37+ cache-to : type=gha,scope=opencase,mode=max
38+
39+ - name : Build and push editor
40+ uses : docker/build-push-action@v6
41+ with :
42+ context : apps/editor
43+ push : true
44+ tags : ${{ vars.IMAGE_REGISTRY }}/editor:${{ env.IMAGE_TAG }}
45+ cache-from : type=gha,scope=editor
46+ cache-to : type=gha,scope=editor,mode=max
47+
48+ trigger-deploy :
49+ needs : build-and-push
50+ runs-on : ubuntu-latest
51+ steps :
52+ - uses : peter-evans/repository-dispatch@v3
53+ with :
54+ token : ${{ secrets.DEPLOY_REPO_TOKEN }}
55+ repository : ${{ vars.DEPLOY_REPO }}
56+ event-type : deploy
57+ client-payload : ' {"image_tag": "${{ env.IMAGE_TAG }}"}'
Original file line number Diff line number Diff line change 11.env
22AGENTS.md
3+ .DS_Store
You can’t perform that action at this time.
0 commit comments