-
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (50 loc) · 1.47 KB
/
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
name: Docker
on:
push:
branches:
- main
jobs:
build-and-push-api:
name: Deploy API Docker Image
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3.4.0
- name: Build and push
uses: openzim/docker-publish-action@v10
with:
restrict-to: openzim/cms
image-name: openzim/cms-api
context: backend
on-master: latest
registries: ghcr.io
credentials:
GHCRIO_USERNAME=${{ secrets.GHCR_USERNAME }}
GHCRIO_TOKEN=${{ secrets.GHCR_TOKEN }}
build-and-push-ui:
name: Deploy UI Docker Image
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3.4.0
- name: Build and push
uses: openzim/docker-publish-action@v10
with:
restrict-to: openzim/cms
image-name: openzim/cms-ui
context: frontend
on-master: latest
registries: ghcr.io
credentials:
GHCRIO_USERNAME=${{ secrets.GHCR_USERNAME }}
GHCRIO_TOKEN=${{ secrets.GHCR_TOKEN }}
- name: Restart live API
uses: actions-hub/kubectl@master
env:
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
with:
args: rollout restart deployments api-deployment -n cms
- name: Restart live UI
uses: actions-hub/kubectl@master
env:
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
with:
args: rollout restart deployments ui-deployment -n cms