Skip to content

Commit f0addef

Browse files
authored
CI: Fetch tags and 200 commits to support describe (#3381)
This tests the behavior of PRs with the docker build. It should reuse the `ghcr.io/nipreps/fmriprep:master` cache. It also checks out enough history to properly create a version string and cuts down on wheel build time by ~50%. [skipcircle]
2 parents da43ba2 + 98ad45b commit f0addef

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

.github/workflows/docker.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ jobs:
2626
steps:
2727
- name: Checkout repository
2828
uses: actions/checkout@v4
29+
with:
30+
fetch-depth: 200
31+
fetch-tags: true
2932

3033
- name: Setup Docker buildx
3134
uses: docker/setup-buildx-action@v3

Dockerfile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,10 @@ ARG BASE_IMAGE=ubuntu:jammy-20240125
2828
#
2929
# Build wheel
3030
#
31-
FROM python:slim AS src
32-
RUN pip install build
33-
RUN apt-get update && \
34-
apt-get install -y --no-install-recommends git
31+
FROM ghcr.io/astral-sh/uv:python3.12-alpine AS src
32+
RUN apk add git
3533
COPY . /src
36-
RUN python -m build /src
34+
RUN uvx --from build pyproject-build --installer uv -w /src
3735

3836
#
3937
# Download stages

0 commit comments

Comments
 (0)