File tree Expand file tree Collapse file tree 2 files changed +48
-0
lines changed Expand file tree Collapse file tree 2 files changed +48
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Docker Build
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+ - develop
8
+ - " feature/**"
9
+ - " hotfix/**"
10
+ tags :
11
+ - " v*.*.*"
12
+ pull_request :
13
+ branches :
14
+ - main
15
+ - develop
16
+
17
+ jobs :
18
+ docker :
19
+ runs-on : ubuntu-latest
20
+ steps :
21
+ - uses : pnstack/actions/docker-publish@main
22
+ with :
23
+ platforms : linux/amd64,linux/arm64
24
+ dockerfile : Dockerfile
25
+ context : .
26
+ push_enabled : true
27
+ registry : ghcr.io
Original file line number Diff line number Diff line change
1
+ # Base image with uv and Python 3.11
2
+ FROM ghcr.io/astral-sh/uv:python3.11-bookworm as base
3
+
4
+ # Set working directory
5
+ WORKDIR /app
6
+
7
+ # Enable UV optimizations
8
+ ENV UV_COMPILE_BYTECODE=1
9
+ ENV UV_LINK_MODE=copy
10
+
11
+ # Install dependencies into .venv using uv
12
+ RUN --mount=type=cache,target=/root/.cache/uv \
13
+ --mount=type=bind,source=pyproject.toml,target=pyproject.toml \
14
+ --mount=type=bind,source=uv.lock,target=uv.lock \
15
+ uv sync --frozen --no-install-project --no-dev
16
+
17
+ # Add the venv to the PATH
18
+ ENV PATH="/app/.venv/bin:$PATH"
19
+
20
+ # Make `python` the entrypoint so you can run scripts easily
21
+ ENTRYPOINT ["python" ]
You can’t perform that action at this time.
0 commit comments