Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 92 additions & 0 deletions .github/workflows/fast-time-server-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: Fast Time Server Image

on:
push:
branches: ["main"]
tags: ["v*"]
paths:
- "Cargo.toml"
- "Cargo.lock"
- "rust-toolchain.toml"
- "crates/**"
- "mcp-servers/rust/fast-time-server/**"
- ".github/workflows/fast-time-server-image.yml"
pull_request:
types: [opened, synchronize, ready_for_review]
branches: ["main"]
paths:
- "Cargo.toml"
- "Cargo.lock"
- "rust-toolchain.toml"
- "crates/**"
- "mcp-servers/rust/fast-time-server/**"
- ".github/workflows/fast-time-server-image.yml"
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

env:
REGISTRY: ghcr.io
IMAGE_NAME: ibm/fast-time-server

jobs:
build:
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
name: Build fast-time-server image
runs-on: ubuntu-latest
timeout-minutes: 60
permissions:
contents: read
packages: write

steps:
- name: Checkout
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
with:
persist-credentials: false

- name: Set up QEMU
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3
with:
platforms: arm64

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
with:
version: latest

- name: Log in to GHCR
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata
id: meta
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=sha,format=long
type=ref,event=tag
type=raw,value=latest,enable={{is_default_branch}}

- name: Build and push
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6
with:
context: .
file: mcp-servers/rust/fast-time-server/Containerfile
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha,scope=fast-time-server-image
cache-to: type=gha,mode=max,scope=fast-time-server-image
provenance: false
11 changes: 6 additions & 5 deletions .github/workflows/sql-sanitizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ jobs:
- name: Install Rust stable 1
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
source $HOME/.cargo/env
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
source "$HOME/.cargo/env"
rustc --version


Expand Down Expand Up @@ -171,6 +171,7 @@ jobs:
sleep 1

nohup target/debug/fast-time-server \
-transport=dual -listen=0.0.0.0 -port=9080 -log-level=info \
> fast-time-server.log 2>&1 &
echo $! > fast-time-server.pid

Expand Down Expand Up @@ -268,10 +269,10 @@ jobs:

- name: Local Node 22 Install
run: |
mkdir -p $GITHUB_WORKSPACE/node22
mkdir -p "$GITHUB_WORKSPACE/node22"
curl -fsSL https://nodejs.org/dist/v22.22.0/node-v22.22.0-linux-x64.tar.xz -o node22.tar.xz
tar -xJf node22.tar.xz --strip-components=1 -C $GITHUB_WORKSPACE/node22
$GITHUB_WORKSPACE/node22/bin/node -v
tar -xJf node22.tar.xz --strip-components=1 -C "$GITHUB_WORKSPACE/node22"
"$GITHUB_WORKSPACE/node22/bin/node" -v

- name: Test sql-sanitizer
run: |
Expand Down
15 changes: 3 additions & 12 deletions .github/workflows/wrapper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
types: [opened, synchronize, reopened]
paths:
- "crates/wrapper/**"
- "mcp-servers/go/fast-time-server/**"
- "mcp-servers/rust/fast-time-server/**"
- "Cargo.toml"
- "Cargo.lock"
- "rust-toolchain.toml"
Expand Down Expand Up @@ -123,25 +123,16 @@ jobs:
-H "Authorization: Bearer ${{ steps.generate_jwt.outputs.token }}" \
-H "Content-Type: application/json"

- name: Setup Go
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
with:
go-version: "1.23"
cache-dependency-path: mcp-servers/go/fast-time-server/go.sum
cache: true

- name: Build fast-time-server
working-directory: mcp-servers/go/fast-time-server
run: |
go build -o fast-time-server .
chmod +x fast-time-server
cargo build -p fast-time-server

- name: Start fast-time-server
run: |
pkill -9 -f "fast-time-server" 2>/dev/null || true
sleep 1

nohup mcp-servers/go/fast-time-server/fast-time-server \
nohup target/debug/fast-time-server \
-transport=dual -listen=0.0.0.0 -port=8080 -log-level=info \
> fast-time-server.log 2>&1 &
echo $! > fast-time-server.pid
Expand Down
Loading
Loading