forked from bunkerity/bunkerweb-plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (35 loc) · 1.02 KB
/
tests.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
name: Tests
on:
push:
branches: [dev, main]
jobs:
setup:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Get BW tag
run: |
if [ "$GITHUB_REF" = "refs/heads/main" ] ; then
echo "BW_TAG=master" >> $GITHUB_ENV
else
echo "BW_TAG=dev" >> $GITHUB_ENV
fi
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Pull and build BW
run: ./.tests/bw.sh "${{ env.BW_TAG }}"
- name: Run ClamAV tests
run: ./.tests/clamav.sh
- name: Run CrowdSec tests
run: ./.tests/crowdsec.sh
- name: Run VirusTotal tests
run: ./.tests/virustotal.sh
env:
VIRUSTOTAL_API_KEY: ${{ secrets.VIRUSTOTAL_API_KEY }}
- name: Build and push APIs
if: env.BW_TAG == 'master'
run: ./.tests/build-push.sh