Skip to content

Commit 6c1caa0

Browse files
committed
Add build-arg for release type
Signed-off-by: Samuel Monson <[email protected]>
1 parent 31a0861 commit 6c1caa0

File tree

5 files changed

+18
-0
lines changed

5 files changed

+18
-0
lines changed

.github/workflows/development.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,8 @@ jobs:
298298
uses: redhat-actions/buildah-build@v2
299299
with:
300300
image: ${{ github.event.repository.name }}
301+
build-args: |
302+
GUIDELLM_BUILD_TYPE=dev
301303
tags: "pr-${{ github.event.number }}"
302304
containerfiles: |
303305
./Containerfile

.github/workflows/nightly.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,8 @@ jobs:
256256
uses: redhat-actions/buildah-build@v2
257257
with:
258258
image: ${{ github.event.repository.name }}
259+
build-args: |
260+
GUIDELLM_BUILD_TYPE=nightly
259261
tags: nightly
260262
containerfiles: |
261263
./Containerfile

.github/workflows/release-candidate.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,8 @@ jobs:
300300
uses: redhat-actions/buildah-build@v2
301301
with:
302302
image: ${{ github.event.repository.name }}
303+
build-args: |
304+
GUIDELLM_BUILD_TYPE=candidate
303305
# TODO: Tag version
304306
tags: latest
305307
containerfiles: |

.github/workflows/release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,8 @@ jobs:
299299
uses: redhat-actions/buildah-build@v2
300300
with:
301301
image: ${{ github.event.repository.name }}
302+
build-args: |
303+
GUIDELLM_BUILD_TYPE=release
302304
# TODO: Tag version
303305
tags: latest stable
304306
containerfiles: |

Containerfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
ARG BASE_IMAGE=docker.io/python:3.13-slim
22

3+
# release: take the last version and add a post if build iteration
4+
# candidate: increment to next minor, add 'rc' with build iteration
5+
# nightly: increment to next minor, add 'a' with build iteration
6+
# alpha: increment to next minor, add 'a' with build iteration
7+
# dev: increment to next minor, add 'dev' with build iteration
8+
ARG GUIDELLM_BUILD_TYPE=dev
9+
310
# Use a multi-stage build to create a lightweight production image
411
FROM $BASE_IMAGE as builder
512

@@ -9,6 +16,9 @@ USER root
916
# Copy repository files
1017
COPY / /opt/app-root/src
1118

19+
# Set correct build type for versioning
20+
ENV GUIDELLM_BUILD_TYPE=$GUIDELLM_BUILD_TYPE
21+
1222
# Create a venv and install guidellm
1323
RUN python3 -m venv /opt/app-root/guidellm \
1424
&& /opt/app-root/guidellm/bin/pip install --no-cache-dir /opt/app-root/src

0 commit comments

Comments
 (0)