Skip to content

Commit 41ee2d5

Browse files
committed
Init mcp
0 parents  commit 41ee2d5

14 files changed

Lines changed: 2173 additions & 0 deletions

File tree

.dockerignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
target/
2+
.git/
3+
.gitignore
4+
README.md
5+
*.md

.github/workflows/dataflow-mcp.yml

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
name: DataFlow MCP (Rust)
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
tags:
8+
- 'v*'
9+
pull_request:
10+
branches:
11+
- main
12+
workflow_dispatch:
13+
14+
env:
15+
REGISTRY: ghcr.io
16+
IMAGE_NAME: ${{ github.repository_owner }}/dataflow-mcp
17+
18+
jobs:
19+
test:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@v4
24+
25+
- name: Install Rust
26+
uses: dtolnay/rust-action@stable
27+
with:
28+
components: rustfmt, clippy
29+
30+
- name: Cache cargo registry
31+
uses: actions/cache@v4
32+
with:
33+
path: |
34+
~/.cargo/registry
35+
~/.cargo/git
36+
target
37+
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
38+
restore-keys: |
39+
${{ runner.os }}-cargo-
40+
41+
# - name: Check formatting
42+
# working-directory: dataflow-mcp
43+
# run: cargo fmt --all -- --check
44+
45+
- name: Run tests
46+
working-directory: dataflow-mcp
47+
run: cargo test
48+
49+
# - name: Run clippy
50+
# working-directory: dataflow-mcp
51+
# run: cargo clippy -- -D warnings
52+
53+
build-and-push:
54+
runs-on: ubuntu-latest
55+
needs: [test]
56+
permissions:
57+
contents: read
58+
packages: write
59+
60+
steps:
61+
- name: Checkout repository
62+
uses: actions/checkout@v4
63+
with:
64+
fetch-depth: 0
65+
66+
- name: Set up Docker Buildx
67+
uses: docker/setup-buildx-action@v3
68+
69+
- name: Log in to Container Registry
70+
uses: docker/login-action@v3
71+
with:
72+
registry: ${{ env.REGISTRY }}
73+
username: ${{ github.actor }}
74+
password: ${{ secrets.GITHUB_TOKEN }}
75+
76+
- name: Extract metadata (tags, labels) for Docker
77+
id: meta
78+
uses: docker/metadata-action@v5
79+
with:
80+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
81+
tags: |
82+
type=ref,event=branch
83+
type=ref,event=pr
84+
type=semver,pattern={{version}}
85+
type=sha,prefix=
86+
type=raw,value=latest,enable={{is_default_branch}}
87+
88+
- name: Build and push Docker image
89+
uses: docker/build-push-action@v5
90+
with:
91+
context: ./dataflow-mcp
92+
file: ./Dockerfile
93+
push: ${{ github.event_name != 'pull_request' }}
94+
tags: ${{ steps.meta.outputs.tags }}
95+
labels: ${{ steps.meta.outputs.labels }}
96+
cache-from: type=gha
97+
cache-to: type=gha,mode=max

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/target

0 commit comments

Comments
 (0)