Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/dockerize.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Build and push Docker image
on:
release:
types: [published]
workflow_dispatch:
jobs:
dockerize:
name: Build and push to GHCR
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v6
- name: Build image
run: |
buildah build \
-t ghcr.io/${{ github.repository }}:$GITHUB_REF_NAME \
-t ghcr.io/${{ github.repository }}:latest .
- name: Push image
run: |
buildah login -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} ghcr.io
buildah push ghcr.io/${{ github.repository }}:$GITHUB_REF_NAME
buildah push ghcr.io/${{ github.repository }}:latest
10 changes: 8 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
FROM python:3.13-slim-bookworm
FROM ghcr.io/astral-sh/uv:python3.14-trixie-slim AS builder

WORKDIR /app
COPY . .
RUN pip install . && pip cache purge && rm -rf /app/*
RUN uv build

FROM python:3.14-slim-trixie

COPY --from=builder /app/dist/*.whl /tmp/
RUN pip install --no-cache-dir /tmp/*.whl && rm /tmp/*.whl

ENTRYPOINT ["crpy"]
CMD ["--help"]
Loading