Skip to content

Commit

Permalink
CI: Fetch tags and 200 commits to support describe (#3381)
Browse files Browse the repository at this point in the history
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]
  • Loading branch information
effigies authored Oct 12, 2024
2 parents da43ba2 + 98ad45b commit f0addef
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 200
fetch-tags: true

- name: Setup Docker buildx
uses: docker/setup-buildx-action@v3
Expand Down
8 changes: 3 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,10 @@ ARG BASE_IMAGE=ubuntu:jammy-20240125
#
# Build wheel
#
FROM python:slim AS src
RUN pip install build
RUN apt-get update && \
apt-get install -y --no-install-recommends git
FROM ghcr.io/astral-sh/uv:python3.12-alpine AS src
RUN apk add git
COPY . /src
RUN python -m build /src
RUN uvx --from build pyproject-build --installer uv -w /src

#
# Download stages
Expand Down

0 comments on commit f0addef

Please sign in to comment.