-
Notifications
You must be signed in to change notification settings - Fork 195
84 lines (76 loc) · 3.29 KB
/
sh-build-push-docker.yml
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: Build Docker Images (Selfhosted)
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
env:
ENVIRONMENT: SELF_HOSTED
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push Frontend (Magic Links)
uses: docker/build-push-action@v2
with:
platforms: linux/amd64,linux/arm64
context: .
file: ./apps/magic-link/Dockerfile
push: true
tags: panoradotdev/frontend-magic-links:latest
build-args: |
VITE_BACKEND_DOMAIN=${{ secrets.VITE_BACKEND_DOMAIN }}
- name: Build and push Frontend (Dashboard)
uses: docker/build-push-action@v2
with:
platforms: linux/amd64,linux/arm64
context: .
file: ./apps/client-ts/Dockerfile
push: true
tags: panoradotdev/frontend-webapp:latest
build-args: |
NEXT_PUBLIC_BACKEND_DOMAIN=${{ secrets.NEXT_PUBLIC_BACKEND_DOMAIN }}
NEXT_PUBLIC_MAGIC_LINK_DOMAIN=${{ secrets.NEXT_PUBLIC_MAGIC_LINK_DOMAIN }}
NEXT_PUBLIC_STYTCH_PROJECT_ID=${{ secrets.NEXT_PUBLIC_STYTCH_PROJECT_ID }}
NEXT_PUBLIC_STYTCH_SECRET=${{ secrets.NEXT_PUBLIC_STYTCH_SECRET }}
NEXT_PUBLIC_STYTCH_PROJECT_ENV=${{ secrets.NEXT_PUBLIC_STYTCH_PROJECT_ENV }}
NEXT_PUBLIC_STYTCH_PUBLIC_TOKEN=${{ secrets.NEXT_PUBLIC_STYTCH_PUBLIC_TOKEN }}
NEXT_PUBLIC_DISTRIBUTION=${{ env.DISTRIBUTION }}
- name: Build and push Backend (API)
uses: docker/build-push-action@v2
with:
platforms: linux/amd64,linux/arm64
context: .
file: ./packages/api/Dockerfile
push: true
tags: panoradotdev/backend-api:latest
build-args: |
OAUTH_REDIRECT_BASE=${{ env.OAUTH_REDIRECT_BASE }}
DISTRIBUTION=${{ env.DISTRIBUTION }}
ENV=${{ ENV }}
DATABASE_URL=postgresql://${{env.POSTGRES_USER}}:${{secrets.POSTGRES_PASSWORD}}@${{env.POSTGRES_HOST}}:5432/${{env.POSTGRES_DB}}?ssl=false
JWT_SECRET=${{ secrets.JWT_SECRET }}
REDIS_HOST=redis
ENCRYPT_CRYPTO_SECRET_KEY=${{ secrets.ENCRYPT_CRYPTO_SECRET_KEY }}
HUBSPOT_CLIENT_ID=${{ secrets.HUBSPOT_CLIENT_ID }}
HUBSPOT_CLIENT_SECRET=${{ secrets.HUBSPOT_CLIENT_SECRET }}
ZOHOCRM_CLIENT_ID=${{ secrets.ZOHOCRM_CLIENT_ID }}
ZOHOCRM_CLIENT_SECRET=${{ secrets.ZOHOCRM_CLIENT_SECRET }}
PIPEDRIVE_CLIENT_ID=${{ secrets.PIPEDRIVE_CLIENT_ID }}
PIPEDRIVE_CLIENT_SECRET=${{ secrets.PIPEDRIVE_CLIENT_SECRET }}
ZENDESK_CLIENT_ID=${{ secrets.ZENDESK_CLIENT_ID }}
ZENDESK_CLIENT_SECRET=${{ secrets.ZENDESK_CLIENT_SECRET }}
ZENDESK_TICKETING_SUBDOMAIN=${{ secrets.ZENDESK_TICKETING_SUBDOMAIN }}
ZENDESK_TICKETING_CLIENT_ID=${{ secrets.ZENDESK_TICKETING_CLIENT_ID }}
ZENDESK_TICKETING_CLIENT_SECRET=${{ secrets.ZENDESK_TICKETING_CLIENT_SECRET }}