Skip to content

Commit 7a73a46

Browse files
committed
housekeeping directories, building images
1 parent 7d5e975 commit 7a73a46

File tree

7 files changed

+65
-4
lines changed

7 files changed

+65
-4
lines changed

.github/workflows/ci.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [ main ]
7+
8+
jobs:
9+
lint-and-typecheck:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v4
14+
15+
- name: Setup Bun
16+
uses: oven-sh/setup-bun@v2
17+
with:
18+
bun-version: latest
19+
20+
- name: Install dependencies
21+
run: bun install
22+
23+
- name: Run logic/type checks
24+
run: bun x tsc --noEmit
25+
26+
build-and-push:
27+
needs: [lint-and-typecheck]
28+
runs-on: ubuntu-latest
29+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
30+
permissions:
31+
contents: read
32+
packages: write
33+
steps:
34+
- name: Checkout code
35+
uses: actions/checkout@v4
36+
37+
- name: Login to GitHub Container Registry
38+
uses: docker/login-action@v3
39+
with:
40+
registry: ghcr.io
41+
username: ${{ github.actor }}
42+
password: ${{ secrets.GITHUB_TOKEN }}
43+
44+
- name: Extract metadata (tags, labels) for Docker
45+
id: meta
46+
uses: docker/metadata-action@v5
47+
with:
48+
images: ghcr.io/${{ github.repository }}
49+
tags: |
50+
type=raw,value=latest
51+
type=sha
52+
53+
- name: Build and push Docker image
54+
uses: docker/build-push-action@v6
55+
with:
56+
context: .
57+
push: true
58+
tags: ${{ steps.meta.outputs.tags }}
59+
labels: ${{ steps.meta.outputs.labels }}

drizzle.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { defineConfig } from 'drizzle-kit';
22

33
export default defineConfig({
4-
out: './drizzle',
4+
out: './src/drizzle',
55
schema: './src/db/schema.ts',
66
dialect: 'postgresql',
77
dbCredentials: {

example.env

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ PORT=3000
22
BASE_URL=https://your-domain.com
33

44
DATABASE_URL=postgresql://user:pass@localhost:5432/rosetta
5-
HACKAI_KEY=
5+
6+
OPENROUTER_API_KEY=
7+
OPENROUTER_API_URL=
68

79
SLACK_BOT_TOKEN=xoxb-YOUR-BOT-TOKEN
810
SLACK_APP_TOKEN=xapp-YOUR-APP-TOKEN

src/lib/hackai.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { OpenRouter } from "@openrouter/sdk";
22

33
const client = new OpenRouter({
4-
apiKey: process.env.HACKAI_KEY,
5-
serverURL: "https://ai.hackclub.com/proxy/v1",
4+
apiKey: process.env.OPENROUTER_API_KEY,
5+
serverURL: process.env.OPENROUTER_API_URL,
66
});
77

88
export async function needsTranslation(text: string): Promise<boolean> {

0 commit comments

Comments
 (0)