CI: set version from git 4
All checks were successful
/ build (push) Successful in 14s
/ test (push) Successful in 5s

This commit is contained in:
phil 2025-01-11 03:20:22 +01:00
parent 26b7c049b6
commit ea5fab38d5
2 changed files with 10 additions and 4 deletions

View file

@ -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)