forked from kafka-ops/julie
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (51 loc) · 1.58 KB
/
release-docker.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
name: Docker publish
on:
push:
tags:
- 'v3.*.*'
- 'v4.*.*'
jobs:
ktb_docker_build:
if: github.repository == 'kafka-ops/julie'
name: Build docker image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- name: Docker meta
id: docker_meta
uses: crazy-max/ghaction-docker-meta@v5
with:
images: purbon/kafka-topology-builder # list of Docker images to use as base name for tags
tag-sha: true
tag-semver: |
{{version}}
{{major}}.{{minor}}
- name: Set up the JDK
uses: actions/setup-java@v4
with:
java-version: 11
distribution: "temurin"
cache: maven
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: copy fat jar
run: cp ./target/julie-ops.jar release/docker
- name: copy runner file
run: cp ./src/main/scripts/julie-ops-cli.sh release/docker
- name: list files (release dir)
run: ls -l
working-directory: release/docker
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Push to Docker Hub
uses: docker/build-push-action@v6
with:
context: release/docker
file: release/docker/Dockerfile
push: true
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}