-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (37 loc) · 1.22 KB
/
ci.yaml
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
name: CI
on:
push:
branches:
- prod
- dev
jobs:
build-and-push:
runs-on: self-hosted
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Login to registry
uses: docker/login-action@v3
with:
registry: ${{ secrets.REGISTRY_URL }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Install docker
uses: docker/setup-buildx-action@v3
- name: Backend - Build and push
uses: docker/build-push-action@v6
with:
context: ./backend
push: true
tags: |
${{ secrets.REGISTRY_URL }}/integration/api
env:
VITE_API_URL: ${{ github.ref == 'refs/heads/master' && 'https://integration.utt.fr/api' || 'https://integration.dev.uttnetgroup.fr/api' }}
VITE_SERVICE_URL: ${{ github.ref == 'refs/heads/master' && 'https://integration.utt.fr' || 'https://integration.dev.uttnetgroup.fr' }}
- name: Frontend - Build and push
uses: docker/build-push-action@v6
with:
context: ./frontend
push: true
tags: |
${{ secrets.REGISTRY_URL }}/integration/front