Skip to content

Commit b6242c9

Browse files
committed
[DOP-25148] Pass real app version into Docker labels
1 parent 7a701b2 commit b6242c9

2 files changed

Lines changed: 18 additions & 2 deletions

File tree

.github/workflows/image_release.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
tags:
88
- '[0-9]+.[0-9]+.[0-9]+'
99

10+
env:
11+
DEFAULT_PYTHON: '3.13'
12+
1013
jobs:
1114
release:
1215
name: Build & push image to Dockerhub
@@ -29,6 +32,19 @@ jobs:
2932
- name: Checkout code
3033
uses: actions/checkout@v4
3134

35+
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
36+
uses: actions/setup-python@v5
37+
with:
38+
python-version: ${{ env.DEFAULT_PYTHON }}
39+
40+
- name: Install poetry
41+
uses: snok/install-poetry@v1
42+
43+
- name: Get version
44+
id: get_version
45+
run: |
46+
echo "VERSION=$(poetry version --short)" >> $GITHUB_ENV
47+
3248
- name: Docker meta
3349
id: meta
3450
uses: docker/metadata-action@v5
@@ -37,9 +53,10 @@ jobs:
3753
labels: |
3854
org.opencontainers.image.title=Data.Rentgen
3955
org.opencontainers.image.vendor=MTS PJSC
40-
org.opencontainers.image.documentation=https://data-rentgen.readthedocs.io/
56+
org.opencontainers.image.documentation=https://data-rentgen.readthedocs.io
4157
org.opencontainers.image.url=https://hub.docker.com/r/mtsrus/data-rentgen
4258
org.opencontainers.image.authors=DataOps.ETL <onetools@mts.ru>
59+
org.opencontainers.image.version=${{ env.VERSION }}
4360
4461
- name: Set platforms
4562
id: set_platforms

docker/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ RUN --mount=type=cache,target=/root/.cache/pypoetry \
2525

2626

2727
FROM python:3.13-slim AS prod
28-
LABEL maintainer="DataOps.ETL"
2928

3029
RUN apt-get update \
3130
&& apt-get install -y --no-install-recommends \

0 commit comments

Comments
 (0)