-
Notifications
You must be signed in to change notification settings - Fork 231
52 lines (48 loc) · 1.43 KB
/
docker-release.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
46
47
48
49
50
51
52
name: Release
on:
push:
tags:
- '[0-9]+\.[0-9]+\.[0-9]+'
jobs:
docker-release:
name: Docker Image Release
strategy:
matrix:
platform: [ "ubuntu-22.04" ]
jdk: ["17"]
runs-on: ${{ matrix.platform }}
permissions:
contents: write
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.jdk }}
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.jdk }}
distribution: "zulu"
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Build TarGz
run: |
./gradlew --build-cache releaseTarGz
# docker image release
- name: Cp TarGz to Docker Path
run: |
cp ./core/build/distributions/kafka_2.13-${{ github.ref_name }}.tgz ./docker/
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_READ_WRITE_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: ./docker
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/kafka:${{ github.ref_name }}
platforms: linux/amd64,linux/arm64