Skip to content

Commit db2ce1d

Browse files
author
Thomas Hanke
committed
fix release tagging
1 parent dd7c6cf commit db2ce1d

3 files changed

Lines changed: 7 additions & 1 deletion

File tree

.github/workflows/PublishContainer.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,5 @@ jobs:
4545
push: true
4646
tags: ${{ steps.meta.outputs.tags }}
4747
labels: ${{ steps.meta.outputs.labels }}
48+
build-args: |
49+
APP_VERSION=${{ github.ref_name }}

Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,8 @@ COPY ./ontologies/qudt_unit.ttl ./ontologies/qudt_unit.ttl
2323
ENV PYTHONDONTWRITEBYTECODE 1
2424
# Turns off buffering for easier container logging
2525
ENV PYTHONUNBUFFERED 1
26+
27+
# Bake the git release tag into the image so the app can report its version
28+
ARG APP_VERSION=dev
29+
ENV APP_VERSION=${APP_VERSION}
2630
ENTRYPOINT ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "5000", "--workers", "6","--proxy-headers"]

settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class Setting(BaseSettings):
66
app_name: str = "CSVtoCSVW"
77
admin_email: str = os.environ.get("ADMIN_MAIL") or "csvtocsvw@matolab.org"
88
items_per_user: int = 50
9-
version: str = "v1.3.2"
9+
version: str = os.environ.get("APP_VERSION") or "v1.3.5"
1010
config_name: str = os.environ.get("APP_MODE") or "development"
1111
openapi_url: str = "/api/openapi.json"
1212
docs_url: str = "/api/docs"

0 commit comments

Comments
 (0)