-
Notifications
You must be signed in to change notification settings - Fork 6
64 lines (53 loc) · 1.49 KB
/
codegen.yaml
File metadata and controls
64 lines (53 loc) · 1.49 KB
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
55
56
57
58
59
60
61
62
63
64
name: Codegen
on:
push:
branches:
- 'main'
- 'release/*'
tags:
- 'v*'
pull_request:
branches:
- 'main'
- 'release/*'
jobs:
docker:
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build Backend no push
uses: docker/build-push-action@v3
with:
context: .
file: ./backend/Dockerfile
platforms: linux/amd64
push: false
tags: github-action
- name: Start containers
run: docker compose -f "docker-compose.yml" up -d --build
- name: Install node
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install dependencies
working-directory: frontend
run: npm install
- name: Run Codegen
working-directory: frontend
run: npm run codegen:v2:test
- name: Verify Changed files
uses: tj-actions/verify-changed-files@v14
id: verify-changed-files
with:
files: frontend/src/openapi
- name: Perform action when openapi file changes
if: contains(steps.verify-changed-files.outputs.changed_files, 'frontend/src/openapi')
run: |
echo "Codegen is out of sync"
echo "Changed files: ${{ steps.verify-changed-files.outputs.changed_files }}"
exit 1
- name: Stop containers
if: always()
run: docker compose -f "docker-compose.yml" down