Skip to content

Commit ae82e28

Browse files
traviswheelerclaude
andcommitted
Add Dockerfile and GitHub Actions workflow to publish to ghcr.io
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 9204222 commit ae82e28

2 files changed

Lines changed: 46 additions & 0 deletions

File tree

.github/workflows/docker.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Build and push Docker image
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
build-and-push:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
13+
packages: write
14+
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Log in to GitHub Container Registry
20+
uses: docker/login-action@v3
21+
with:
22+
registry: ghcr.io
23+
username: ${{ github.actor }}
24+
password: ${{ secrets.GITHUB_TOKEN }}
25+
26+
- name: Extract version from tag
27+
id: meta
28+
uses: docker/metadata-action@v5
29+
with:
30+
images: ghcr.io/${{ github.repository_owner }}/blimmp
31+
tags: |
32+
type=semver,pattern={{version}}
33+
type=semver,pattern={{major}}.{{minor}}
34+
type=raw,value=latest
35+
36+
- name: Build and push
37+
uses: docker/build-push-action@v5
38+
with:
39+
context: .
40+
push: true
41+
tags: ${{ steps.meta.outputs.tags }}

Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM python:3.10-slim
2+
3+
WORKDIR /app
4+
COPY . .
5+
RUN pip install --no-cache-dir .

0 commit comments

Comments
 (0)