Skip to content

Commit 89f8326

Browse files
authored
Fix #161 - Automation for Docker publish and mkdocs githubio (#163)
* Fix #161 - Automation for Docker publish and mkdocs githubio * add venv to path
1 parent 2eff4f4 commit 89f8326

File tree

3 files changed

+53
-3
lines changed

3 files changed

+53
-3
lines changed

.github/workflows/build_and_publish.yml

+45
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,48 @@ jobs:
1616
- uses: astral-sh/setup-uv@v3
1717
- run: uv build
1818
- run: uv publish --trusted-publishing always
19+
20+
docker-image-CI:
21+
name: Docker Image CI
22+
runs-on: ubuntu-latest
23+
steps:
24+
25+
- name: Check out git repository
26+
uses: actions/checkout@v4
27+
28+
- name: Login to Docker Hub
29+
uses: docker/login-action@v3
30+
with:
31+
username: ${{ secrets.DOCKER_USERNAME }}
32+
password: ${{ secrets.DOCKER_PASSWORD }}
33+
34+
- name: Set up Docker Buildx
35+
id: buildx
36+
uses: docker/setup-buildx-action@v3
37+
38+
- name: Publish server image (Dockerfile-server) to Registry
39+
uses: docker/build-push-action@v6
40+
with:
41+
context: ./
42+
file: ./Dockerfile
43+
push: true
44+
provenance: mode=max
45+
sbom: true
46+
tags: "clinicalgenomics/genmod:latest, clinicalgenomics/genmod:${{ github.event.release.tag_name }}"
47+
48+
49+
deploy-docs:
50+
name: Deploy Docs to GitHubIO
51+
runs-on: ubuntu-latest
52+
steps:
53+
- name: Checkout repo
54+
uses: actions/checkout@v4
55+
- name: Setup environment for docs deployment
56+
uses: actions/setup-python@v5
57+
with:
58+
python-version: 3.x
59+
- name: Install mkdocs
60+
run: pip install mkdocs mkdocs-material markdown-include
61+
- name: Deploy documentation
62+
run: mkdocs gh-deploy --force
63+

CHANGELOG.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,16 @@ Please add a new candidate release at the top after changing the latest one. Fee
99
Try to use the following format:
1010

1111
## [unreleased]
12+
### Changed
13+
- Use `uv` with `hatchling` to build and publish ([#104](https://github.com/Clinical-Genomics/genmod/issues/143))
14+
- Automation for Docker publish and mkdocs githubio ([#161](https://github.com/Clinical-Genomics/genmod/issues/161))
1215
### Fixed
1316
- The optional fields Source and Version are allowed in the VCF header([#106](https://github.com/Clinical-Genomics/genmod/pull/106))
1417
- Released the constraint on Python 3.8 (collections, pkg_resources to importlib, tests) ([#142](https://github.com/Clinical-Genomics/genmod/pull/142))
1518
- Update annotation examples ([#144](https://github.com/Clinical-Genomics/genmod/pull/144))
1619
- Updated documentation with warning about compounds only being scored within the first family in the VCF ([#151](https://github.com/Clinical-Genomics/genmod/pull/151))
1720
- Fixed sorting of variants ([#152](https://github.com/Clinical-Genomics/genmod/pull/152))
1821
- genmod annotate for mitochondrial variants when using the `chrM` notation ([#157](https://github.com/Clinical-Genomics/genmod/pull/157))
19-
- Use `uv` with `hatchling` to build and publish ([#104](https://github.com/Clinical-Genomics/genmod/issues/143))
2022
- Fix linting issues ([#154](https://github.com/Clinical-Genomics/genmod/issues/154))
2123
- genmod models adds headers to VCF even if it contains no variants ([#160](https://github.com/Clinical-Genomics/genmod/pull/160))
2224

Dockerfile

+5-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@ RUN apk update & apk add build-base zlib-dev
77
# Copy the project into the image
88
ADD . /app
99

10-
# Sync the project into a new environment, using the frozen lockfile
10+
# Sync the project into a new virtual environment, using the frozen lockfile
1111
WORKDIR /app
1212
RUN uv sync --frozen
1313

14-
ENTRYPOINT ["uv", "run", "genmod"]
14+
# Add the project venv to PATH to be able to run genmod without changing to the environment
15+
ENV PATH="/app/.venv/bin:$PATH"
16+
17+
ENTRYPOINT ["genmod"]

0 commit comments

Comments
 (0)