Add GitHub Actions workflow for container image builds#2
Conversation
Co-authored-by: kelleyblackmore <16111250+kelleyblackmore@users.noreply.github.com>
Co-authored-by: kelleyblackmore <16111250+kelleyblackmore@users.noreply.github.com>
Co-authored-by: kelleyblackmore <16111250+kelleyblackmore@users.noreply.github.com>
|
@copilot 1s |
There was a problem hiding this comment.
Pull Request Overview
This PR adds automated Docker image building and publishing to GitHub Container Registry (GHCR) using GitHub Actions, along with comprehensive documentation updates.
- Implements a CI/CD workflow that builds multi-platform Docker images (amd64 and arm64) and publishes them to GHCR
- Updates README with instructions for using pre-built images from GHCR
- Documents the CI/CD process and adds project structure details including the new workflow file
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| .github/workflows/docker-build-publish.yml | New GitHub Actions workflow for building and publishing multi-platform Docker images to GHCR on push to main, tags, and pull requests |
| README.md | Adds documentation for pre-built images, updates Claude Desktop config to use GHCR images, documents CI/CD workflow, and updates project structure |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "-e", | ||
| "VAULT_TOKEN=your-vault-token", | ||
| "vault-mcp" | ||
| "ghcr.io/kelleyblackmore/vault-mcp:latest" |
There was a problem hiding this comment.
The image reference change from vault-mcp to ghcr.io/kelleyblackmore/vault-mcp:latest is a breaking change for existing users who have built the image locally. Consider documenting a migration note for users upgrading from a local setup to the GHCR images, or provide both examples side-by-side initially.
There was a problem hiding this comment.
Added migration documentation to help users understand their options when switching from local builds to GHCR images. The note now clearly explains both approaches. (730a4ae)
| type=semver,pattern={{version}} | ||
| type=semver,pattern={{major}}.{{minor}} | ||
| type=semver,pattern={{major}} | ||
| type=sha,prefix={{branch}}- |
There was a problem hiding this comment.
The SHA tag generation using prefix={{branch}}- may produce unexpected results. For pull requests, this will use the PR branch name rather than the base branch. Consider using a static prefix like sha- or removing the branch prefix for cleaner tag naming: type=sha.
| type=sha,prefix={{branch}}- | |
| type=sha,prefix=sha- |
Co-authored-by: kelleyblackmore <16111250+kelleyblackmore@users.noreply.github.com>
Fixed the invalid tag format error. The issue was caused by |
|
@copilot Run docker/build-push-action@v5 #1 [internal] load build definition from Dockerfile #2 [linux/amd64 internal] load metadata for docker.io/library/node:20-alpine #3 [auth] library/node:pull token for registry-1.docker.io #4 [linux/arm64 internal] load metadata for docker.io/library/node:20-alpine #2 [linux/amd64 internal] load metadata for docker.io/library/node:20-alpine #5 [internal] load .dockerignore #4 [linux/arm64 internal] load metadata for docker.io/library/node:20-alpine #6 [internal] load build context #7 [linux/arm64 builder 1/6] FROM docker.io/library/node:20-alpine@sha256:6178e78b972f79c335df281f4b7674a2d85071aae2af020ffa39f0a770265435 #8 importing cache manifest from gha:1700154126132761330 #6 [internal] load build context #9 [linux/amd64 builder 1/6] FROM docker.io/library/node:20-alpine@sha256:6178e78b972f79c335df281f4b7674a2d85071aae2af020ffa39f0a770265435 #7 [linux/arm64 builder 1/6] FROM docker.io/library/node:20-alpine@sha256:6178e78b972f79c335df281f4b7674a2d85071aae2af020ffa39f0a770265435 #9 [linux/amd64 builder 1/6] FROM docker.io/library/node:20-alpine@sha256:6178e78b972f79c335df281f4b7674a2d85071aae2af020ffa39f0a770265435 #7 [linux/arm64 builder 1/6] FROM docker.io/library/node:20-alpine@sha256:6178e78b972f79c335df281f4b7674a2d85071aae2af020ffa39f0a770265435 #10 [linux/arm64 builder 2/6] WORKDIR /app #9 [linux/amd64 builder 1/6] FROM docker.io/library/node:20-alpine@sha256:6178e78b972f79c335df281f4b7674a2d85071aae2af020ffa39f0a770265435 #11 [linux/arm64 builder 3/6] COPY package*.json ./ #12 [linux/arm64 builder 4/6] COPY tsconfig.json ./ #13 [linux/arm64 builder 5/6] COPY src ./src #14 [linux/arm64 builder 6/6] RUN npm config set strict-ssl false && npm install #9 [linux/amd64 builder 1/6] FROM docker.io/library/node:20-alpine@sha256:6178e78b972f79c335df281f4b7674a2d85071aae2af020ffa39f0a770265435 #9 [linux/amd64 builder 1/6] FROM docker.io/library/node:20-alpine@sha256:6178e78b972f79c335df281f4b7674a2d85071aae2af020ffa39f0a770265435 #15 [linux/amd64 builder 2/6] WORKDIR /app #16 [linux/arm64 stage-1 4/5] RUN npm config set strict-ssl false && npm ci --omit=dev --ignore-scripts #17 [linux/amd64 builder 3/6] COPY package*.json ./ #18 [linux/amd64 builder 4/6] COPY tsconfig.json ./ #19 [linux/amd64 builder 5/6] COPY src ./src #20 [linux/amd64 builder 6/6] RUN npm config set strict-ssl false && npm install #21 [linux/amd64 stage-1 4/5] RUN npm config set strict-ssl false && npm ci --omit=dev --ignore-scripts #16 [linux/arm64 stage-1 4/5] RUN npm config set strict-ssl false && npm ci --omit=dev --ignore-scripts #14 [linux/arm64 builder 6/6] RUN npm config set strict-ssl false && npm install
|
Co-authored-by: kelleyblackmore <16111250+kelleyblackmore@users.noreply.github.com>
Fixed the |
Create GitHub Action for building container image
Plan:
prefix={{branch}}-from SHA tag which was creating invalid tags like:-80796betype=shawhich creates valid tags likesha-80796benpm citonpm installin Dockerfile since package-lock.json is not committedComplete! The workflow now correctly builds Docker images without errors.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.