1
# Licensed to the Apache Software Foundation (ASF) under one or more
2
# contributor license agreements. See the NOTICE file distributed with
3
# this work for additional information regarding copyright ownership.
4
# The ASF licenses this file to You under the Apache License, Version 2.0
5
# (the "License"); you may not use this file except in compliance with
6
# the License. You may obtain a copy of the License at
8
# http://www.apache.org/licenses/LICENSE-2.0
10
# Unless required by applicable law or agreed to in writing, software
11
# distributed under the License is distributed on an "AS IS" BASIS,
12
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
# See the License for the specific language governing permissions and
14
# limitations under the License.
16
name: Build and Push Release Candidate Docker Image
23
description: Docker image type to be built and pushed
28
description: RC docker image that needs to be built and pushed to Dockerhub (Example:- apache/kafka:3.8.0-rc0 (OR) apache/kafka-native:3.8.0-rc0)
31
description: Kafka url to be used to build the docker image
36
if: github.repository == 'apache/kafka'
37
runs-on: ubuntu-latest
40
uses: actions/checkout@v4
41
- name: Set up Python 3.10
42
uses: actions/setup-python@v5
44
python-version: "3.10"
45
- name: Install dependencies
47
python -m pip install --upgrade pip
48
pip install -r docker/requirements.txt
50
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0
51
- name: Set up Docker Buildx
52
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1
53
- name: Login to Docker Hub
54
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
56
username: ${{ secrets.DOCKERHUB_USER }}
57
password: ${{ secrets.DOCKERHUB_TOKEN }}
58
- name: Release the RC docker image
60
RC_DOCKER_IMAGE: ${{ github.event.inputs.rc_docker_image }}
61
KAFKA_URL: ${{ github.event.inputs.kafka_url }}
62
IMAGE_TYPE: ${{ github.event.inputs.image_type }}
64
python docker/docker_release.py $RC_DOCKER_IMAGE --kafka-url $KAFKA_URL --image-type $IMAGE_TYPE