-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (44 loc) · 1.47 KB
/
docker-build-push.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
45
46
47
48
name: Build and push docker images
on:
push:
branches:
- main
jobs:
docker-backend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/build-push-action@v3
with:
context: backend
push: true
tags: ghcr.io/nogesma/ft_transcendence_backend:latest
cache-from: type=registry,ref=ghcr.io/nogesma/ft_transcendence_backend:latest
cache-to: type=inline
docker-frontend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/build-push-action@v3
with:
context: frontend
push: true
tags: ghcr.io/nogesma/ft_transcendence_frontend:latest
cache-from: type=registry,ref=ghcr.io/nogesma/ft_transcendence_frontend:latest
cache-to: type=inline
build-args: |
VITE_REDIRECT_URI=${{ secrets.REDIRECT_URI }}
VITE_CLIENT_ID=${{ secrets.CIENT_ID }}
VITE_BACKEND_URI=${{ secrets.BACKEND_URI }}
BACKEND_INTERNAL_URI=${{ secrets.BACKEND_INTERNAL_URI }}
CADDY_URL=${{ secrets.CADDY_URL }}