Updated ci
Some checks failed
Build on push / prepare (push) Successful in 22s
Build on push / query (push) Failing after 10s
Build on push / core (push) Failing after 13s

This commit is contained in:
2025-09-15 17:09:10 +02:00
parent 4719c32457
commit a30567852b
2 changed files with 22 additions and 9 deletions

View File

@@ -15,15 +15,13 @@ jobs:
core: core:
needs: prepare needs: prepare
uses: ./.gitea/workflows/package.yaml uses: ./.gitea/workflows/package.yaml
defaults: with:
run: working_directory: src/cpl_core
working-directory: src/cpl_core
secrets: inherit secrets: inherit
query: query:
needs: prepare needs: prepare
uses: ./.gitea/workflows/package.yaml uses: ./.gitea/workflows/package.yaml
defaults: with:
run: working_directory: src/cpl_query
working-directory: src/cpl_query
secrets: inherit secrets: inherit

View File

@@ -8,12 +8,17 @@ on:
description: 'Suffix for version (z.B. "dev", "alpha", "beta")' description: 'Suffix for version (z.B. "dev", "alpha", "beta")'
required: false required: false
type: string type: string
working_directory:
required: true
type: string
jobs: jobs:
build: build:
runs-on: [ runner ] runs-on: [ runner ]
container: git.sh-edraft.de/sh-edraft.de/act-runner:latest container: git.sh-edraft.de/sh-edraft.de/act-runner:latest
defaults:
run:
working-directory: ${{ inputs.working_directory }}
steps: steps:
- name: Clone Repository - name: Clone Repository
uses: https://github.com/actions/checkout@v3 uses: https://github.com/actions/checkout@v3
@@ -29,8 +34,18 @@ jobs:
run: | run: |
VERSION_SUFFIX="${{ inputs.version_suffix }}" VERSION_SUFFIX="${{ inputs.version_suffix }}"
if [ -n "$VERSION_SUFFIX" ]; then if [ -n "$VERSION_SUFFIX" ]; then
sed -i -E "s/^version = \".*\"/version = \"$(cat version.txt)-$VERSION_SUFFIX\"/" pyproject.toml if [[ "$VERSION_SUFFIX" == "dev" ]]; then
echo "Using dev versioning"
BASE_VERSION=$(cat version.txt | sed -E 's/([0-9]+\.[0-9]+\.[0-9]+\.)([0-9]+)/\1/')
DEV_NUMBER=$(echo "$VERSION_SUFFIX" | sed -E 's/dev([0-9]*)/\1/')
DEV_NUMBER=${DEV_NUMBER:-1}
sed -i -E "s/^version = \".*\"/version = \"${BASE_VERSION}dev${DEV_NUMBER}\"/" pyproject.toml
else
echo "Using suffix versioning: $VERSION_SUFFIX"
sed -i -E "s/^version = \".*\"/version = \"$(cat version.txt)-$VERSION_SUFFIX\"/" pyproject.toml
fi
else else
echo "Using release versioning"
sed -i -E "s/^version = \".*\"/version = \"$(cat version.txt)\"/" pyproject.toml sed -i -E "s/^version = \".*\"/version = \"$(cat version.txt)\"/" pyproject.toml
fi fi
@@ -40,7 +55,7 @@ jobs:
- name: Build Package - name: Build Package
run: | run: |
python -m build --sdist --wheel --outdir dist python -m build --outdir dist
- name: Login to registry git.sh-edraft.de - name: Login to registry git.sh-edraft.de
uses: https://github.com/docker/login-action@v1 uses: https://github.com/docker/login-action@v1