Skip to content

Commit

Permalink
chore: add tag trigger publish ttc image (#558)
Browse files Browse the repository at this point in the history
add tag publish
  • Loading branch information
sundy-li authored Jan 3, 2025
1 parent 5947ca0 commit 987298f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/ttc.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# .github/workflows/docker-publish.yml

name: Docker
name: TTC docker publish

on:
push:
branches:
- main
tags:
- 'v*'
paths:
- 'core/**'
- 'driver/**'
Expand All @@ -29,9 +31,15 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
- name: Set Docker tag
run: echo "DOCKER_TAG=${{ startsWith(github.ref, 'refs/tags/') && github.ref[10:] || 'latest' }}" >> $GITHUB_ENV

- name: Print Docker tag
run: echo "Start to build and publish: datafuselabs/ttc-rust:$DOCKER_TAG"

- name: TTC Build and push
uses: docker/build-push-action@v2
with:
push: true
file: ./ttc/Dockerfile
tags: datafuselabs/ttc-rust:latest
tags: datafuselabs/ttc-rust:$DOCKER_TAG
2 changes: 1 addition & 1 deletion ttc/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use tokio::net::TcpStream;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Connect to the server
let mut stream = TcpStream::connect("127.0.0.1:9092").await?;
let mut stream = TcpStream::connect("127.0.0.1:9902").await?;

loop {
// Prepare a sql
Expand Down
2 changes: 1 addition & 1 deletion ttc/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use clap::{command, Parser};
#[derive(Debug, Clone, Parser, PartialEq)]
#[command(name = "ttc")]
struct Config {
#[clap(short = 'P', default_value = "9092", env = "TTC_PORT", long)]
#[clap(short = 'P', default_value = "9902", env = "TTC_PORT", long)]
port: u16,
#[clap(
long,
Expand Down

0 comments on commit 987298f

Please sign in to comment.