Skip to content
This repository was archived by the owner on Feb 9, 2026. It is now read-only.

Commit 3f70701

Browse files
update Dockerfile to include .npmrc creation with GITHUB_TOKEN and adjust docker-release workflow to pass build argument
1 parent 4fc4104 commit 3f70701

3 files changed

Lines changed: 10 additions & 4 deletions

File tree

.github/workflows/docker-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
OWNER: "${{ github.repository_owner }}"
4646

4747
- name: Build Docker image
48-
run: docker build -t ghcr.io/${OWNER_LC}/moodle-mcp-server:${{ github.ref_name }} .
48+
run: docker build --build-arg GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} -t ghcr.io/${OWNER_LC}/moodle-mcp-server:${{ github.ref_name }} .
4949

5050
- name: Push Docker image
5151
run: docker push ghcr.io/${OWNER_LC}/moodle-mcp-server:${{ github.ref_name }}

Dockerfile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,15 @@ RUN bun install -g pnpm
55

66
WORKDIR /app
77

8-
# Copy package.json and pnpm-lock.yaml and install only production dependencies
8+
# Copy package.json and pnpm-lock.yaml
99
COPY package.json pnpm-lock.yaml ./
10-
RUN pnpm install --prod
10+
11+
# Create .npmrc with build arg
12+
ARG GITHUB_TOKEN
13+
RUN echo "@toptiertools:registry=https://npm.pkg.github.com" > .npmrc && \
14+
echo "//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}" >> .npmrc && \
15+
pnpm install --prod && \
16+
rm .npmrc
1117

1218
# Copy only the JS files from dist directory
1319
COPY dist/src/*.js ./dist/src/

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ An MCP (Model Context Protocol) server that enables LLMs to interact with the Mo
66

77
This server also provide a REST API that coheres with the openapi spec.
88

9-
The openapi spec is available at `localhost:3000/doc` while the MCP server is available at `localhost:6277/sse`.
9+
The MCP server is available at `localhost:6277/sse`.
1010

1111
[![](https://share.cleanshot.com/xmqhBX0D+)](https://share.cleanshot.com/dFLVz77G)
1212

0 commit comments

Comments
 (0)