16
name: Docker Official Image Build Test
23
description: Docker image type to build and test
27
description: Kafka version for the docker official image. This should be >=3.7.0
32
runs-on: ubuntu-latest
34
- uses: actions/checkout@v4
35
- name: Set up Python 3.10
36
uses: actions/setup-python@v5
38
python-version: "3.10"
39
- name: Install dependencies
41
python -m pip install --upgrade pip
42
pip install -r docker/requirements.txt
43
- name: Build image and run tests
44
working-directory: ./docker
46
IMAGE_TYPE: ${{ github.event.inputs.image_type }}
47
KAFKA_VERSION: ${{ github.event.inputs.kafka_version }}
49
python docker_official_image_build_test.py kafka/test -tag=test -type=$IMAGE_TYPE -v=$KAFKA_VERSION
51
uses: aquasecurity/trivy-action@6e7b7d1fd3e4fef0c5fa8cce1229c54b2c9bd0d8
53
image-ref: 'kafka/test:test'
55
severity: 'CRITICAL,HIGH'
56
output: scan_report_${{ github.event.inputs.image_type }}.txt
58
- name: Upload test report
60
uses: actions/upload-artifact@v4
62
name: report_${{ github.event.inputs.image_type }}.html
63
path: docker/test/report_${{ github.event.inputs.image_type }}.html
64
- name: Upload CVE scan report
66
uses: actions/upload-artifact@v4
68
name: scan_report_${{ github.event.inputs.image_type }}.txt
69
path: scan_report_${{ github.event.inputs.image_type }}.txt