16
name: Docker Build Test
23
description: Docker image type to build and test
28
description: Kafka url to be used to build the docker image
33
runs-on: ubuntu-latest
35
- uses: actions/checkout@v4
36
- name: Set up Python 3.10
37
uses: actions/setup-python@v5
39
python-version: "3.10"
40
- name: Install dependencies
42
python -m pip install --upgrade pip
43
pip install -r docker/requirements.txt
44
- name: Build image and run tests
45
working-directory: ./docker
47
IMAGE_TYPE: ${{ github.event.inputs.image_type }}
48
KAFKA_URL: ${{ github.event.inputs.kafka_url }}
50
python docker_build_test.py kafka/test -tag=test -type=$IMAGE_TYPE -u=$KAFKA_URL
52
uses: aquasecurity/trivy-action@6e7b7d1fd3e4fef0c5fa8cce1229c54b2c9bd0d8
54
image-ref: 'kafka/test:test'
56
severity: 'CRITICAL,HIGH'
57
output: scan_report_${{ github.event.inputs.image_type }}.txt
59
- name: Upload test report
61
uses: actions/upload-artifact@v4
63
name: report_${{ github.event.inputs.image_type }}.html
64
path: docker/test/report_${{ github.event.inputs.image_type }}.html
65
- name: Upload CVE scan report
67
uses: actions/upload-artifact@v4
69
name: scan_report_${{ github.event.inputs.image_type }}.txt
70
path: scan_report_${{ github.event.inputs.image_type }}.txt