-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (26 loc) · 883 Bytes
/
Copy pathbuild-test.yml
File metadata and controls
34 lines (26 loc) · 883 Bytes
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
name: Build Test
on:
push:
branches: [ develop ]
env:
OPEN_AI_API_KEY: ${{ secrets.OPEN_AI_API_KEY }}
PROXY_URL: ${{ secrets.PROXY_URL }}
jobs:
build:
runs-on:
labels: runner-production
steps:
- name: Get Updates
uses: actions/checkout@v3
- name: Create Env-files
run: cp docker/docker-compose.env.template docker/docker-compose.env
- name: Create Dir for Certs
run: mkdir certs
- name: Build the Docker Image
run: docker compose --env-file ./docker/docker-compose.env build backend
- name: Remove Container
run: docker ps -a --format="{{.ID}} {{.Names}}"
| awk '{if ($2 == "drawtables-backend") print $1}'
| xargs --no-run-if-empty docker rm -f
- name: Restart Container
run: docker compose --env-file ./docker/docker-compose.env up -d backend