CI: set version from git 4
This commit is contained in:
parent
26b7c049b6
commit
ea5fab38d5
2 changed files with 10 additions and 4 deletions
|
@ -29,12 +29,17 @@ jobs:
|
|||
|
||||
- name: Get version with git describe
|
||||
id: version
|
||||
run: echo "version=$(git describe)" >> $GITHUB_OUTPUT
|
||||
run: |
|
||||
echo "version=$(git describe)" >> $GITHUB_OUTPUT
|
||||
echo "$VERSION"
|
||||
|
||||
- name: Version
|
||||
- name: Check if the container should be built
|
||||
id: builder
|
||||
env:
|
||||
VERSION: ${{ steps.version.outputs.version }}
|
||||
run: echo "$VERSION"
|
||||
RUN: ${{ toJSON(inputs.build || !contains(steps.version.outputs.version, '-')) }}
|
||||
run: |
|
||||
echo "run=$RUN" >> $GITHUB_OUTPUT
|
||||
echo "Run build: $RUN"
|
||||
|
||||
- name: Set the version in pyproject.toml (workaround for uv not supporting dynamic version)
|
||||
if: fromJSON(steps.builder.outputs.run)
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
[project]
|
||||
name = "oidc-fastapi-test"
|
||||
version = "0.0.0"
|
||||
# dynamic = ["version"]
|
||||
description = "Add your description here"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.13"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue