From 7ad47b0753d3afdbb0aefdfce5588de98a99416c Mon Sep 17 00:00:00 2001 From: KoCoder Date: Thu, 15 Jan 2026 09:09:45 +0100 Subject: [PATCH] Run Pipeline on tag event and set tag name as version in .deb --- .gitea/workflows/build-debian-package.yml | 17 ++++++----------- run-build.sh | 7 +++++++ 2 files changed, 13 insertions(+), 11 deletions(-) create mode 100755 run-build.sh diff --git a/.gitea/workflows/build-debian-package.yml b/.gitea/workflows/build-debian-package.yml index 25dab5f..13516f1 100644 --- a/.gitea/workflows/build-debian-package.yml +++ b/.gitea/workflows/build-debian-package.yml @@ -1,6 +1,9 @@ name: build-debian-package on: - - push + push: + tags: + - v* + jobs: build: @@ -24,14 +27,6 @@ jobs: - name: "Oqtane Framework publish" run: dotnet publish -c Release ./oqtane.framework/Oqtane.slnx -o ./alumnihub_10.0_amd64/opt/alumnihub - name: "Build .deb" - run: dpkg-deb --root-owner-group --build ./alumnihub_10.0_amd64 + run: ./run-build.sh "${{ gitea.ref_name }}"" "./alumnihub_10.0_amd64" - name: "Upload .deb" - run: curl --user kocoder:${{ secrets.REGISTRY_TOKEN_KOCODER }} --upload-file ./alumnihub_10.0_amd64.deb https://git.kocoder.xyz/api/packages/Diplomarbeit-Absolventenverein/debian/pool/trixie/main/upload - #- uses: https://github.com/christopherHX/gitea-upload-artifact@v4 - # with: - # # A file, directory or wildcard pattern that describes what to upload - # # Required. - # path: . - # retention-days: 5 - # overwrite: true - # include-hidden-files: true \ No newline at end of file + run: curl --user kocoder:${{ secrets.REGISTRY_TOKEN_KOCODER }} --upload-file ./alumnihub_10.0_amd64.deb https://git.kocoder.xyz/api/packages/Diplomarbeit-Absolventenverein/debian/pool/trixie/main/upload \ No newline at end of file diff --git a/run-build.sh b/run-build.sh new file mode 100755 index 0000000..4f76658 --- /dev/null +++ b/run-build.sh @@ -0,0 +1,7 @@ +#!/bin/bash +VERSION="$1" +DEBIAN_PACKAGE_PATH="$2" + +echo "Version: ${VERSION}" >> $DEBIAN_PACKAGE_PATH/DEBIAN/control + +dpkg-deb --root-owner-group --build $DEBIAN_PACKAGE_PATH \ No newline at end of file