-
Notifications
You must be signed in to change notification settings - Fork 55
50 lines (45 loc) · 1.42 KB
/
run-compose.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
name: run-compose
on:
push:
paths:
- 'docker-compose*'
- '.github/workflows/run-compose.yml'
pull_request:
paths:
- 'docker-compose*'
- '.github/workflows/run-compose.yml'
branches:
- master
workflow_dispatch:
schedule:
- cron: '0 5 * * 0'
jobs:
test-compose:
runs-on: ubuntu-latest
strategy:
matrix:
module: [alpine-mysql, alpine-mysql-v2, ubuntu-mysql, ubuntu-pgsql, alpine-pgsql]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create required folder
run: |
sudo mkdir -p /data/bareos/config/director
sudo mkdir -p /data/bareos/data/director
sudo mkdir -p /data/bareos/config/storage
sudo mkdir -p /data/bareos/data/storage
sudo mkdir -p /data/bareos/config/client
sudo mkdir -p /data/bareos/config/webui
sudo mkdir -p /data/bareos/data/webui
sudo mkdir -p /data/mysql/data
sudo mkdir -p /data/pgsql/data
sudo chmod 777 /data/bareos /data/mysql /data/pgsql
- name: Run docker-compose
run: |
cp .env.dist .env
sed -i 's#DB_INIT=false#DB_INIT=true#' docker-compose-${{ matrix.module }}.yml
docker-compose -f docker-compose-${{ matrix.module }}.yml up -d
- name: Wait 60s then run Bareos console
run: |
sleep 60
docker exec bareos_bareos-dir_1 bconsole