-
Notifications
You must be signed in to change notification settings - Fork 0
Add AI/Web3 integration bundle with multi-language SDK adapters and container deployment #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -5,9 +5,21 @@ on: | |||||||||||||||||||
| branches: [ main, develop ] | ||||||||||||||||||||
| pull_request: | ||||||||||||||||||||
| branches: [ main, develop ] | ||||||||||||||||||||
| workflow_dispatch: | ||||||||||||||||||||
| inputs: | ||||||||||||||||||||
| environment: | ||||||||||||||||||||
| description: 'Deployment environment' | ||||||||||||||||||||
| required: true | ||||||||||||||||||||
| default: 'dev' | ||||||||||||||||||||
| type: choice | ||||||||||||||||||||
| options: | ||||||||||||||||||||
| - dev | ||||||||||||||||||||
| - stage | ||||||||||||||||||||
| - prod | ||||||||||||||||||||
|
|
||||||||||||||||||||
| permissions: | ||||||||||||||||||||
| contents: read | ||||||||||||||||||||
| packages: write | ||||||||||||||||||||
|
|
||||||||||||||||||||
| jobs: | ||||||||||||||||||||
| python-backend: | ||||||||||||||||||||
|
|
@@ -113,3 +125,98 @@ jobs: | |||||||||||||||||||
| - name: Run contract tests | ||||||||||||||||||||
| working-directory: ./contracts | ||||||||||||||||||||
| run: npm test | ||||||||||||||||||||
|
|
||||||||||||||||||||
| deploy-containers: | ||||||||||||||||||||
| name: Build and Push Container Images | ||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||
| if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && github.ref == 'refs/heads/main') | ||||||||||||||||||||
| needs: [python-backend, node-frontend, contracts] | ||||||||||||||||||||
| permissions: | ||||||||||||||||||||
| contents: read | ||||||||||||||||||||
| packages: write | ||||||||||||||||||||
| strategy: | ||||||||||||||||||||
| matrix: | ||||||||||||||||||||
| environment: ${{ github.event_name == 'workflow_dispatch' && fromJSON(format('["{0}"]', github.event.inputs.environment)) || fromJSON('["dev"]') }} | ||||||||||||||||||||
| environment: ${{ matrix.environment }} | ||||||||||||||||||||
|
|
||||||||||||||||||||
| steps: | ||||||||||||||||||||
| - name: Checkout code | ||||||||||||||||||||
| uses: actions/checkout@v4 | ||||||||||||||||||||
|
|
||||||||||||||||||||
| - name: Set up Docker Buildx | ||||||||||||||||||||
| uses: docker/setup-buildx-action@v3 | ||||||||||||||||||||
|
|
||||||||||||||||||||
| - name: Log in to GitHub Container Registry | ||||||||||||||||||||
| uses: docker/login-action@v3 | ||||||||||||||||||||
| with: | ||||||||||||||||||||
| registry: ghcr.io | ||||||||||||||||||||
| username: ${{ github.actor }} | ||||||||||||||||||||
| password: ${{ secrets.GITHUB_TOKEN }} | ||||||||||||||||||||
|
|
||||||||||||||||||||
| - name: Extract metadata for backend image | ||||||||||||||||||||
| id: meta-backend | ||||||||||||||||||||
| uses: docker/metadata-action@v5 | ||||||||||||||||||||
| with: | ||||||||||||||||||||
| images: ghcr.io/${{ github.repository }}/backend | ||||||||||||||||||||
| tags: | | ||||||||||||||||||||
| type=ref,event=branch | ||||||||||||||||||||
| type=sha,prefix=${{ matrix.environment }}- | ||||||||||||||||||||
| type=raw,value=${{ matrix.environment }}-latest | ||||||||||||||||||||
|
|
||||||||||||||||||||
| - name: Extract metadata for frontend image | ||||||||||||||||||||
| id: meta-frontend | ||||||||||||||||||||
| uses: docker/metadata-action@v5 | ||||||||||||||||||||
| with: | ||||||||||||||||||||
| images: ghcr.io/${{ github.repository }}/frontend | ||||||||||||||||||||
| tags: | | ||||||||||||||||||||
| type=ref,event=branch | ||||||||||||||||||||
| type=sha,prefix=${{ matrix.environment }}- | ||||||||||||||||||||
| type=raw,value=${{ matrix.environment }}-latest | ||||||||||||||||||||
|
|
||||||||||||||||||||
| - name: Build and push backend image | ||||||||||||||||||||
| uses: docker/build-push-action@v5 | ||||||||||||||||||||
| with: | ||||||||||||||||||||
| context: ./backend | ||||||||||||||||||||
| push: true | ||||||||||||||||||||
| tags: ${{ steps.meta-backend.outputs.tags }} | ||||||||||||||||||||
| labels: ${{ steps.meta-backend.outputs.labels }} | ||||||||||||||||||||
| cache-from: type=gha | ||||||||||||||||||||
| cache-to: type=gha,mode=max | ||||||||||||||||||||
| build-args: | | ||||||||||||||||||||
| ENVIRONMENT=${{ matrix.environment }} | ||||||||||||||||||||
| OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }} | ||||||||||||||||||||
|
||||||||||||||||||||
| OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }} |
Copilot
AI
Feb 5, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CI/CD workflow passes multiple build arguments (ENVIRONMENT, OPENAI_API_KEY, AI_PROVIDER, etc.) to the backend Docker build, but the backend Dockerfile does not declare any ARG instructions to receive these values. These build args are unused and will have no effect. If these values are needed, add ARG declarations in the Dockerfile and set them as ENV variables where appropriate, or rely on runtime environment variables instead.
| build-args: | | |
| ENVIRONMENT=${{ matrix.environment }} | |
| OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }} | |
| AI_PROVIDER=${{ vars.AI_PROVIDER }} | |
| VECTOR_PROVIDER=${{ vars.VECTOR_PROVIDER }} | |
| WEB3_CHAIN=${{ vars.WEB3_CHAIN }} | |
| WEB3_RPC_URL=${{ vars.WEB3_RPC_URL }} | |
| MESSAGING_PROVIDER=${{ vars.MESSAGING_PROVIDER }} | |
| STORAGE_PROVIDER=${{ vars.STORAGE_PROVIDER }} |
Copilot
AI
Feb 5, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CI/CD workflow passes multiple build arguments (ENVIRONMENT, NEXT_PUBLIC_API_URL, NEXT_PUBLIC_RPC_URL, NEXT_PUBLIC_CHAIN_ID) to the Docker build, but the frontend Dockerfile does not declare any ARG instructions to receive these values. These build args are unused and will have no effect. If these environment variables are needed in the Next.js build or runtime, add ARG declarations before they are used and set them as ENV variables where appropriate.
| build-args: | | |
| ENVIRONMENT=${{ matrix.environment }} | |
| NEXT_PUBLIC_API_URL=${{ vars.NEXT_PUBLIC_API_URL }} | |
| NEXT_PUBLIC_RPC_URL=${{ vars.NEXT_PUBLIC_RPC_URL }} | |
| NEXT_PUBLIC_CHAIN_ID=${{ vars.NEXT_PUBLIC_CHAIN_ID }} |
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
| @@ -0,0 +1,25 @@ | ||||
| [package] | ||||
| name = "web3ai" | ||||
| version = "1.0.0" | ||||
| edition = "2021" | ||||
|
|
||||
| [dependencies] | ||||
| # AI Stack | ||||
| async-openai = "0.25.1" | ||||
| tokenizers = "0.20.3" | ||||
| candle-core = "0.8.0" | ||||
|
|
||||
| # Web3 Stack | ||||
| ethers = "2.0.14" | ||||
| solana-sdk = "2.1.4" | ||||
| solana-client = "2.1.4" | ||||
| anchor-lang = "0.30.1" | ||||
|
|
||||
| # Messaging | ||||
| slack-morphism = { version = "2.5.0", features = ["hyper"] } | ||||
| serenity = { version = "0.12.2", features = ["client", "gateway", "rustls_backend"] } | ||||
|
|
||||
| # Data | ||||
| tokio-postgres = "0.7.12" | ||||
| redis = { version = "0.27.5", features = ["tokio-comp"] } | ||||
| aws-sdk-s3 = "1.66.0" | ||||
|
Comment on lines
+1
to
+25
|
||||
| aws-sdk-s3 = "1.66.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The workflow references GitHub environments (
dev,stage,prod) via theenvironment:key, but there's no documentation about setting these up in the repository settings. GitHub environments need to be created and configured in the repository settings with appropriate protection rules and environment-specific secrets/variables before this workflow can run successfully. Consider adding documentation in the README about setting up these GitHub environments, or handle missing environments gracefully.