Skip to content

initialize jest in backend + create tests unitaires #29

initialize jest in backend + create tests unitaires

initialize jest in backend + create tests unitaires #29

Workflow file for this run

name: ci-docker
on:
pull_request:
types: [closed]
jobs:
docker:
if: github.event.pull_request.merged == true && github.ref == 'refs/heads/dev'
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push backend
if: startsWith(github.head_ref, 'backend/')
uses: docker/build-push-action@v5
with:
context: ./backend
file: ./backend/Dockerfile.prod
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/backend:latest
- name: Build and push frontend
if: startsWith(github.head_ref, 'frontend/')
uses: docker/build-push-action@v5
with:
context: ./frontend
file: ./frontend/Dockerfile.prod
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/frontend:latest