-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (64 loc) · 2.03 KB
/
prod.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
name: Deploy main to prod
on:
workflow_dispatch:
jobs:
build-static:
runs-on: ubuntu-latest
name: Build & Deploy Docker Static images
environment: prod
steps:
- name: checkout code
uses: actions/checkout@v3
- name: build static
uses: redhat-actions/buildah-build@v2
with:
context: .
layers: true
image: prod-static
tags: latest ${{ github.sha }}
labels: |
app=prod-drivebc
containerfiles: ./compose/frontend/StaticBuild
build-args: |
API_HOST=${{ vars.API_HOST }}
BASE_MAP=${{ vars.BASE_MAP }}
MAP_STYLE=${{ vars.MAP_STYLE }}
HIGHWAY_LAYER=${{ vars.HIGHWAY_LAYER }}
OPEN511_LAYER=${{ vars.OPEN511_LAYER }}
REPLAY_THE_DAY=${{ vars.REPLAY_THE_DAY }}
ROUTE_PLANNER=${{ vars.ROUTE_PLANNER }}
ROUTE_PLANNER_KEY=${{ vars.ROUTE_PLANNER_KEY }}
GEOCODER_HOST=${{ vars.GEOCODER_HOST }}
GEOCODER_API_AUTH_KEY=${{ vars.GEOCODER_API_AUTH_KEY }}
DEBUG_BUILD=false
- name: push to registry
uses: redhat-actions/push-to-registry@v2.7
with:
image: prod-static
registry: ${{ secrets.REGISTRY }}
username: ${{ secrets.BUILDER_USERNAME }}
password: ${{ secrets.BUILDER_TOKEN }}
build-backend:
runs-on: ubuntu-latest
name: Build & Deploy Docker backend images
environment: prod
steps:
- name: checkout code
uses: actions/checkout@v3
- name: build backend
uses: redhat-actions/buildah-build@v2
with:
image: prod-django
tags: latest ${{ github.sha }}
labels: |
app=prod-drivebc
containerfiles: ./compose/backend/Dockerfile
build-args:
DEBUG_BUILD=false
- name: push to registry
uses: redhat-actions/push-to-registry@v2.7
with:
image: prod-django
registry: ${{ secrets.REGISTRY }}
username: ${{ secrets.BUILDER_USERNAME }}
password: ${{ secrets.BUILDER_TOKEN }}