Skip to content

Commit 0cec6b4

Browse files
authored
feat(ci): add workflow to publish bun Docker image to GHCR (#333)
Adds containers/bun.Dockerfile (bun:1-alpine + git) and a GitHub Actions workflow that builds and pushes ghcr.io/decocms/mcps/bun on changes to the Dockerfile or via manual trigger. Made-with: Cursor
1 parent 00a3fce commit 0cec6b4

2 files changed

Lines changed: 48 additions & 0 deletions

File tree

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

containers/bun.Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
FROM oven/bun:1-alpine
2+
3+
RUN apk add --no-cache git

0 commit comments

Comments
 (0)