Skip to content

Commit 1adf0af

Browse files
committed
feat: CI
1 parent 618297e commit 1adf0af

File tree

2 files changed

+44
-2
lines changed

2 files changed

+44
-2
lines changed

.github/workflows/ci.yaml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- prod
7+
- dev
8+
9+
jobs:
10+
build-and-push:
11+
runs-on: self-hosted
12+
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
17+
- name: Login to registry
18+
uses: docker/login-action@v3
19+
with:
20+
registry: ${{ secrets.REGISTRY_URL }}
21+
username: ${{ secrets.REGISTRY_USERNAME }}
22+
password: ${{ secrets.REGISTRY_TOKEN }}
23+
24+
- name: Install docker
25+
uses: docker/setup-buildx-action@v3
26+
27+
- name: Backend - Build and push
28+
uses: docker/build-push-action@v6
29+
with:
30+
context: ./backend
31+
push: true
32+
tags: |
33+
${{ secrets.REGISTRY_URL }}/integration/api
34+
env:
35+
VITE_API_URL: ${{ github.ref == 'refs/heads/master' && 'https://integration.utt.fr/api' || 'https://integration.dev.uttnetgroup.fr/api' }}
36+
VITE_SERVICE_URL: ${{ github.ref == 'refs/heads/master' && 'https://integration.utt.fr' || 'https://integration.dev.uttnetgroup.fr' }}
37+
38+
- name: Frontend - Build and push
39+
uses: docker/build-push-action@v6
40+
with:
41+
context: ./frontend
42+
push: true
43+
tags: |
44+
${{ secrets.REGISTRY_URL }}/integration/front

frontend/Dockerfile

-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
FROM node:23-slim AS builder
22
WORKDIR /app
33

4-
ENV VITE_API_URL="https://integration.utt.fr/api"
54
ENV VITE_CAS_LOGIN_URL="https://cas.utt.fr/cas/login"
6-
ENV VITE_SERVICE_URL="https://integration.utt.fr/"
75

86
COPY package.json package-lock.json ./
97
RUN npm install -g npm@latest

0 commit comments

Comments
 (0)