1168 add contents to docs #1733
Workflow file for this run
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: Codegen | |
on: | |
push: | |
branches: | |
- 'main' | |
- 'release/*' | |
tags: | |
- 'v*' | |
pull_request: | |
branches: | |
- 'main' | |
- 'release/*' | |
jobs: | |
docker: | |
timeout-minutes: 10 | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
node: | |
- "14" | |
steps: | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Build Backend no push | |
uses: docker/build-push-action@v3 | |
with: | |
context: ./backend | |
platforms: linux/amd64 | |
push: false | |
tags: github-action | |
- name: Start containers | |
run: docker compose -f "docker-compose.test.yml" up -d --build | |
# setup node | |
- name: Install node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
- 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.test.yml" down |