Updated ci
Some checks failed
Build on push / prepare (push) Successful in 8s
Build on push / query (push) Successful in 18s
Build on push / core (push) Failing after 18s

This commit is contained in:
2025-09-15 15:05:02 +02:00
parent 2d2bb86720
commit 516fa3fb7e
8 changed files with 87 additions and 52 deletions

View File

@@ -0,0 +1,29 @@
name: Build on push
run-name: Build on push
on:
push:
branches:
- dev
jobs:
prepare:
uses: ./.gitea/workflows/prepare.yaml
with:
version_suffix: 'dev'
secrets: inherit
core:
needs: prepare
uses: ./.gitea/workflows/package.yaml
defaults:
run:
working-directory: src/cpl_core
secrets: inherit
query:
needs: prepare
uses: ./.gitea/workflows/package.yaml
defaults:
run:
working-directory: src/cpl_query
secrets: inherit

View File

@@ -1,14 +0,0 @@
name: Build on push
run-name: Build on push
on:
push:
branches:
- dev
jobs:
prepare:
uses: ./.gitea/workflows/prepare.yaml
build:
needs: prepare
uses: ./.gitea/workflows/package.yaml

View File

@@ -3,11 +3,15 @@ run-name: Build Python Package
on:
workflow_call:
inputs:
version_suffix:
description: 'Suffix for version (z.B. "dev", "alpha", "beta")'
required: false
type: string
jobs:
build:
runs-on: [ runner ]
needs: prepare
container: git.sh-edraft.de/sh-edraft.de/act-runner:latest
steps:
@@ -23,7 +27,12 @@ jobs:
- name: Set version
run: |
sed -i -E "s/^version = \".*\"/version = \"$(cat version.txt)-dev\"/" pyproject.toml
VERSION_SUFFIX="${{ inputs.version_suffix }}"
if [ -n "$VERSION_SUFFIX" ]; then
sed -i -E "s/^version = \".*\"/version = \"$(cat version.txt)-$VERSION_SUFFIX\"/" pyproject.toml
else
sed -i -E "s/^version = \".*\"/version = \"$(cat version.txt)\"/" pyproject.toml
fi
- name: Install Dependencies
run: |
@@ -33,15 +42,14 @@ jobs:
run: |
python -m build --sdist --wheel --outdir dist
upload:
- name: Login to registry git.sh-edraft.de
uses: https://github.com/docker/login-action@v1
with:
registry: git.sh-edraft.de
username: ${{ secrets.CI_USERNAME }}
password: ${{ secrets.CI_ACCESS_TOKEN }}
- name: Login to registry git.sh-edraft.de
uses: https://github.com/docker/login-action@v1
with:
registry: git.sh-edraft.de
username: ${{ secrets.CI_USERNAME }}
password: ${{ secrets.CI_ACCESS_TOKEN }}
- name: Push image
run: |
pip install twine
python -m twine upload --repository-url https://git.sh-edraft.de/api/packages/sh-edraft.de/pypi -u ${{ secrets.CI_USERNAME }} -p ${{ secrets.CI_ACCESS_TOKEN }} ./dist/*
- name: Push image
run: |
pip install twine
python -m twine upload --repository-url https://git.sh-edraft.de/api/packages/sh-edraft.de/pypi -u ${{ secrets.CI_USERNAME }} -p ${{ secrets.CI_ACCESS_TOKEN }} ./dist/*

View File

@@ -3,9 +3,6 @@ run-name: Prepare Build Version
on:
workflow_call:
outputs:
build_version:
value: ${{ jobs.prepare.outputs.build_version }}
jobs:
prepare:

View File

@@ -1,22 +0,0 @@
name: Publish Package
run-name: Publish Python Package
on:
workflow_call:
jobs:
upload:
runs-on: [ runner ]
container: git.sh-edraft.de/sh-edraft.de/act-runner:latest
steps:
- name: Login to registry git.sh-edraft.de
uses: https://github.com/docker/login-action@v1
with:
registry: git.sh-edraft.de
username: ${{ secrets.CI_USERNAME }}
password: ${{ secrets.CI_ACCESS_TOKEN }}
- name: Push image
run: |
pip install twine
python -m twine upload --repository-url https://git.sh-edraft.de/api/packages/sh-edraft.de/pypi -u ${{ secrets.CI_USERNAME }} -p ${{ secrets.CI_ACCESS_TOKEN }} ./dist/*