-
Notifications
You must be signed in to change notification settings - Fork 37
54 lines (52 loc) · 2.33 KB
/
build_check.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
name: mthc
on:
schedule:
- cron: '0 0 1 * *'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
submodules: recursive
- name: Increase limits on mmapfs on host for Elasticsearch
run: echo -e "vm.max_map_count=262144" | sudo tee -a /etc/sysctl.conf; sudo sysctl -p
- name: Build the stack
run: docker-compose up -d
- name: Waiting for stack to build....
uses: jakejarvis/wait-action@master
with:
time: '60s'
- name: Gathering cortex service status
run: |
echo "{cortext_status}={docker inspect -f {{.State.Running}} $(docker ps -f name=mthc_cortex_1 --quiet)}" >> $GITHUB_ENV
echo "cortex service status: $cortex_status"
- name: Gathering thehive service status
run: |
echo "{thehive_status}={docker inspect -f {{.State.Running}} $(docker ps -f name=mthc_thehive_1 --quiet)}" >> $GITHUB_ENV
echo "thehive service status: $thehive_status"
- name: Gathering misp-web service status
run: |
echo "{mispweb_status}={docker inspect -f {{.State.Running}} $(docker ps -f name=mthc_misp-web_1 --quiet)}" >> $GITHUB_ENV
echo "misp-web service status: $mispweb_status"
- name: Gathering elasticsearch service status
run: |
echo "{elasticsearch_status}={docker inspect -f {{.State.Running}} $(docker ps -f name=mthc_elasticsearch_1 --quiet)}" >> $GITHUB_ENV
echo "elasticsearch service status: $elasticsearch_status"
- name: Gathering nginx-proxy service status
run: |
echo "{proxy_status}={docker inspect -f {{.State.Running}} $(docker ps -f name=mthc_nginx-proxy_1 --quiet)}" >> $GITHUB_ENV
echo "nginx-proxy service status: $cortex_status"
- name: Gathering misp-db service status
run: |
echo "{mispdb_status}={docker inspect -f {{.State.Running}} $(docker ps -f name=mthc_misp-db_1 --quiet)}" >> $GITHUB_ENV
echo "misp-db service status: $cortex_status"
- name: Validating all statuses
run: |
if $cortex_status && $thehive_status && $mispweb_status && $elasticsearch_status && $proxy_status && $mispdb_status; then
exit 0
else
exit 1
fi