Skip to content

Commit ceb6a33

Browse files
committed
feat: kafka v2, adds releaser
1 parent 314f84c commit ceb6a33

File tree

5 files changed

+58
-96
lines changed

5 files changed

+58
-96
lines changed

.github/workflows/build-dev.yml

Lines changed: 0 additions & 60 deletions
This file was deleted.

.github/workflows/releaser.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Publish Release
2+
3+
on:
4+
push:
5+
branches:
6+
- dev
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
14+
- name: Get latest version tag
15+
id: get_version
16+
run: |
17+
# Fetch tags from the repository
18+
git fetch --tags
19+
# Get the latest tag, if exists, otherwise default to v0.0.0
20+
latest_tag=$(git describe --tags --abbrev=0 || echo "v0.0.0")
21+
echo "Latest tag: $latest_tag"
22+
23+
# Split the version into its components
24+
major=$(echo $latest_tag | cut -d. -f1 | tr -d 'v')
25+
minor=$(echo $latest_tag | cut -d. -f2)
26+
patch=$(echo $latest_tag | cut -d. -f3)
27+
28+
# Increment the patch version
29+
patch=$((patch + 1))
30+
31+
# Create the new version tag
32+
new_version="v$major.$minor.$patch"
33+
echo "New version: $new_version"
34+
35+
# Set the new version as an output
36+
echo "::set-output name=version::$new_version"
37+
38+
- name: Create a Release
39+
uses: elgohr/Github-Release-Action@v5
40+
env:
41+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
with:
43+
title: ${{ steps.get_version.outputs.version }} 🎉
44+
tag_name: ${{ steps.get_version.outputs.version }}

.github/workflows/test.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

docker/docker-compose.dev.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ services:
1212
- "9092:9092"
1313
environment:
1414
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
15-
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://192.168.1.8:9092
15+
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://$PRIVATE_IP:9092 # Use the dynamic private IP here
1616
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
1717
depends_on:
1818
- zookeeper
19-
19+
2020
kafka-ui:
2121
container_name: kafka-ui
2222
image: provectuslabs/kafka-ui:latest
@@ -43,4 +43,4 @@ services:
4343
- redis
4444
environment:
4545
REDISINSIGHT_UI_USERNAME: admin
46-
REDISINSIGHT_UI_PASSWORD: admin
46+
REDISINSIGHT_UI_PASSWORD: admin

start.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
PRIVATE_IP=$(ifconfig wlp2s0 | grep 'inet ' | awk '{print $2}')
4+
if [ -z "$PRIVATE_IP" ]; then
5+
echo "Private IP not found!"
6+
exit 1
7+
fi
8+
9+
export PRIVATE_IP
10+
sudo docker stop $(sudo docker ps -aq) && sudo docker rm $(sudo docker ps -aq)
11+
sudo docker-compose -f docker/docker-compose.dev.yml up -d

0 commit comments

Comments
 (0)