Skip to content

Commit 34e94b9

Browse files
Merge pull request #118 from Create-Python-App/fix/59-docker
ci: Docker image publish workflow (#59)
2 parents 70b6aae + 3aa369a commit 34e94b9

2 files changed

Lines changed: 32 additions & 0 deletions

File tree

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Publish Docker image
2+
on:
3+
push:
4+
tags:
5+
- "create-awesome-python-app@*"
6+
workflow_dispatch:
7+
inputs:
8+
version:
9+
description: "Package version"
10+
required: true
11+
jobs:
12+
docker:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- name: Login to Docker Hub
17+
uses: docker/login-action@v3
18+
with:
19+
username: ${{ secrets.DOCKERHUB_USERNAME }}
20+
password: ${{ secrets.DOCKERHUB_TOKEN }}
21+
- name: Build and push
22+
uses: docker/build-push-action@v6
23+
with:
24+
context: .
25+
push: true
26+
tags: |
27+
${{ secrets.DOCKERHUB_USERNAME }}/create-awesome-python-app:latest

Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim
2+
WORKDIR /app
3+
COPY . .
4+
RUN uv sync --frozen --no-dev
5+
ENTRYPOINT ["uv", "run", "create-awesome-python-app"]

0 commit comments

Comments
 (0)