Files
FarmaFinder/.gitea/workflows/docker.yaml
T
Ichitux 2f9c0d27df
Build & Push Docker Images / test-backend (push) Successful in 20s
Build & Push Docker Images / test-frontend (push) Successful in 21s
Build & Push Docker Images / build-frontend (push) Successful in 27s
Build & Push Docker Images / build-backend (push) Successful in 18s
fix(ci): use --ci for backend (Jest), keep --run for frontend (Vitest)
Backend uses Jest, not Vitest — --run is unrecognized. --ci is the
Jest equivalent that disables watch mode and exits cleanly. Frontend
already uses --run --reporter=basic (Vitest) which is correct.

Verified locally: backend `npm test -- --ci` → 17/17 passing.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-28 13:09:25 +02:00

68 lines
1.8 KiB
YAML

name: Build & Push Docker Images
run-name: ${{ gitea.actor }} - ${{ gitea.ref }}
on:
push:
branches:
- main
jobs:
test-backend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: cd backend && npm ci
- name: Run tests
run: cd backend && npm test -- --ci
test-frontend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: cd frontend && npm ci
- name: Run tests
run: cd frontend && npm test -- --run --reporter=basic
build-backend:
needs: [ test-backend, test-frontend ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Log in to Gitea registry
uses: docker/login-action@v3
with:
registry: git.hacecalor.net
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push backend image
uses: docker/build-push-action@v5
with:
context: .
file: ./backend/Dockerfile
push: true
tags: |
git.hacecalor.net/ichitux/farmafinder-backend:latest
git.hacecalor.net/ichitux/farmafinder-backend:${{ gitea.sha }}
build-frontend:
needs: [ test-backend, test-frontend ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Log in to Gitea registry
uses: docker/login-action@v3
with:
registry: git.hacecalor.net
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push frontend image
uses: docker/build-push-action@v5
with:
context: ./frontend
push: true
tags: |
git.hacecalor.net/ichitux/farmafinder-frontend:latest
git.hacecalor.net/ichitux/farmafinder-frontend:${{ gitea.sha }}