Skip to content

Apply good practices #95

Apply good practices

Apply good practices #95

Workflow file for this run

name: Tests
on:
push:
branches: [dev, main]
jobs:
codeql:
uses: ./.github/workflows/codeql.yml
permissions:
actions: read
contents: read
security-events: write
setup:
needs: codeql
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- name: Get BW tag
run: |
if [ "$GITHUB_REF" = "refs/heads/main" ] ; then
echo "BW_TAG=1.5.1" >> $GITHUB_ENV
else
echo "BW_TAG=dev" >> $GITHUB_ENV
fi
- name: Login to Docker Hub
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
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 Coraza tests
run: ./.tests/coraza.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 == '1.5.1'
run: ./.tests/build-push.sh "${{ env.BW_TAG }}"