Skip to content

Commit fe613a3

Browse files
author
TechFusionData
committed
ci: add GitHub Actions workflow to build and push Docker image to GHCR
1 parent c3c05d2 commit fe613a3

2 files changed

Lines changed: 53 additions & 3 deletions

File tree

.github/workflows/docker.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Build and push Docker image
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
env:
9+
REGISTRY: ghcr.io
10+
IMAGE_NAME: ${{ github.repository }}
11+
12+
jobs:
13+
build-and-push:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
17+
packages: write
18+
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
23+
- name: Log in to GHCR
24+
uses: docker/login-action@v3
25+
with:
26+
registry: ${{ env.REGISTRY }}
27+
username: ${{ github.actor }}
28+
password: ${{ secrets.GITHUB_TOKEN }}
29+
30+
- name: Extract metadata
31+
id: meta
32+
uses: docker/metadata-action@v5
33+
with:
34+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
35+
tags: |
36+
type=raw,value=latest
37+
38+
- name: Build and push
39+
uses: docker/build-push-action@v5
40+
with:
41+
context: .
42+
push: true
43+
tags: ${{ steps.meta.outputs.tags }}
44+
labels: ${{ steps.meta.outputs.labels }}
45+
platforms: linux/amd64

Dockerfile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,16 @@ FROM node:20-slim
22

33
# System deps needed for native npm modules (sqlite3 etc.)
44
RUN apt-get update && apt-get install -y --no-install-recommends \
5-
python3 make g++ git curl \
5+
python3 make g++ git curl unzip \
66
&& rm -rf /var/lib/apt/lists/*
77

8-
# Install elizaos CLI globally
9-
RUN npm install -g @elizaos/cli@1.7.2
8+
# Install bun, then elizaos CLI
9+
# --ignore-scripts skips the ollama plugin postinstall (not needed — we use Groq)
10+
RUN curl -fsSL https://bun.sh/install | bash && \
11+
export PATH="/root/.bun/bin:$PATH" && \
12+
npm install -g @elizaos/cli@1.7.2 --ignore-scripts
13+
14+
ENV PATH="/root/.bun/bin:$PATH"
1015

1116
WORKDIR /app
1217

0 commit comments

Comments
 (0)