From 103da6abe85dc1a5d6a818ebf9f242d1673f369c Mon Sep 17 00:00:00 2001 From: Penry Date: Sun, 7 Jun 2026 20:27:03 +0200 Subject: [PATCH 1/9] Test Commit --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 117e054..e5b747d 100644 --- a/README.md +++ b/README.md @@ -6,3 +6,5 @@ There are two options: - latest: Is the latest release Version - nightly: Is the latest commit on the main branch + +Test-Commit From 1a1d7dec7c70fbe391cf12d94910aa29a5d2d1ef Mon Sep 17 00:00:00 2001 From: Penry Date: Sun, 7 Jun 2026 20:29:44 +0200 Subject: [PATCH 2/9] Test --- .gitea/workflows/linux_arm64_docker.yaml | 38 ++---------------------- 1 file changed, 2 insertions(+), 36 deletions(-) diff --git a/.gitea/workflows/linux_arm64_docker.yaml b/.gitea/workflows/linux_arm64_docker.yaml index e6c7a9c..ce53378 100644 --- a/.gitea/workflows/linux_arm64_docker.yaml +++ b/.gitea/workflows/linux_arm64_docker.yaml @@ -28,42 +28,8 @@ jobs: - name: Build version shell: bash run: | - set -euo pipefail - - git fetch --force --tags origin - git fetch --force origin main:refs/remotes/origin/main - - LAST_TAG=$(git for-each-ref \ - --sort=-creatordate \ - --format='%(refname:strip=2)' \ - refs/tags/v* \ - | head -n 1) - - if [[ -z "${LAST_TAG:-}" ]]; then - echo "No tag found" - exit 1 - fi - - LAST_COMMIT=$(git rev-list -n 1 "$LAST_TAG") - DISTANCE=$(git rev-list --count --first-parent "${LAST_COMMIT}..origin/main") - - BASE_VERSION="${LAST_TAG#v}" - - if [[ "$BASE_VERSION" == *-* ]]; then - VERSION="${BASE_VERSION}.${DISTANCE}" - else - VERSION="${BASE_VERSION}-nightly.${DISTANCE}" - fi - - echo "LAST_TAG=$LAST_TAG" >> "$GITHUB_ENV" - echo "LAST_COMMIT=$LAST_COMMIT" >> "$GITHUB_ENV" - echo "DISTANCE=$DISTANCE" >> "$GITHUB_ENV" - echo "VERSION=$VERSION" >> "$GITHUB_ENV" - - echo "Last tag: $LAST_TAG" - echo "Last tag commit: $LAST_COMMIT" - echo "Distance to origin/main: $DISTANCE" - echo "Final version: $VERSION" + COMMIT_COUNT=$(git rev-list $(git describe --tags --abbrev=0)..HEAD --count + echo "Commit Count: $COMMIT_COUNT" - name: Set .NET version variables shell: bash From b2e851d7658a34c65ea57f70c7aa717dfbd42eea Mon Sep 17 00:00:00 2001 From: Penry Date: Sun, 7 Jun 2026 20:30:32 +0200 Subject: [PATCH 3/9] Adpated Workflow for Running every Time --- .gitea/workflows/linux_arm64_docker.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/linux_arm64_docker.yaml b/.gitea/workflows/linux_arm64_docker.yaml index ce53378..c98a6ae 100644 --- a/.gitea/workflows/linux_arm64_docker.yaml +++ b/.gitea/workflows/linux_arm64_docker.yaml @@ -3,7 +3,7 @@ name: Build Docker Linux ARM64 on: push: branches: - - main + - * jobs: build-docker-linux-arm64: From a7c86289b36c5340345d4c6ea362df7052719b6f Mon Sep 17 00:00:00 2001 From: Penry Date: Sun, 7 Jun 2026 20:31:29 +0200 Subject: [PATCH 4/9] Adpated Workflow for working only on those Branches --- .gitea/workflows/linux_arm64_docker.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/linux_arm64_docker.yaml b/.gitea/workflows/linux_arm64_docker.yaml index c98a6ae..b372715 100644 --- a/.gitea/workflows/linux_arm64_docker.yaml +++ b/.gitea/workflows/linux_arm64_docker.yaml @@ -3,7 +3,8 @@ name: Build Docker Linux ARM64 on: push: branches: - - * + - main + - Test-Branch jobs: build-docker-linux-arm64: From 5e086c0598fab91c62c083bdbc4fe752bed3cc3f Mon Sep 17 00:00:00 2001 From: Penry Date: Sun, 7 Jun 2026 20:32:46 +0200 Subject: [PATCH 5/9] Fixed Syntax --- .gitea/workflows/linux_arm64_docker.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/linux_arm64_docker.yaml b/.gitea/workflows/linux_arm64_docker.yaml index b372715..3dfbaf5 100644 --- a/.gitea/workflows/linux_arm64_docker.yaml +++ b/.gitea/workflows/linux_arm64_docker.yaml @@ -29,7 +29,7 @@ jobs: - name: Build version shell: bash run: | - COMMIT_COUNT=$(git rev-list $(git describe --tags --abbrev=0)..HEAD --count + COMMIT_COUNT=$(git rev-list $(git describe --tags --abbrev=0)..HEAD --count) echo "Commit Count: $COMMIT_COUNT" - name: Set .NET version variables From 9ccb929553ffd755aae40583d4655caabd7439dc Mon Sep 17 00:00:00 2001 From: Penry Date: Sun, 7 Jun 2026 20:34:28 +0200 Subject: [PATCH 6/9] Added Tags fetching --- .gitea/workflows/linux_arm64_docker.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitea/workflows/linux_arm64_docker.yaml b/.gitea/workflows/linux_arm64_docker.yaml index 3dfbaf5..b57f5d2 100644 --- a/.gitea/workflows/linux_arm64_docker.yaml +++ b/.gitea/workflows/linux_arm64_docker.yaml @@ -29,6 +29,7 @@ jobs: - name: Build version shell: bash run: | + git fetch --tags COMMIT_COUNT=$(git rev-list $(git describe --tags --abbrev=0)..HEAD --count) echo "Commit Count: $COMMIT_COUNT" From 6d2a6c5925d5148ed89078ea12383ad7c5372cba Mon Sep 17 00:00:00 2001 From: Penry Date: Sun, 7 Jun 2026 20:41:31 +0200 Subject: [PATCH 7/9] Added fetch depth --- .gitea/workflows/linux_arm64_docker.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/linux_arm64_docker.yaml b/.gitea/workflows/linux_arm64_docker.yaml index b57f5d2..ac09cb0 100644 --- a/.gitea/workflows/linux_arm64_docker.yaml +++ b/.gitea/workflows/linux_arm64_docker.yaml @@ -15,6 +15,8 @@ jobs: - name: Checkout uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Setup Docker Buildx uses: docker/setup-buildx-action@v3 @@ -29,7 +31,6 @@ jobs: - name: Build version shell: bash run: | - git fetch --tags COMMIT_COUNT=$(git rev-list $(git describe --tags --abbrev=0)..HEAD --count) echo "Commit Count: $COMMIT_COUNT" From c7d741d15b687e4cc56e5f11e2096fd90b3c2550 Mon Sep 17 00:00:00 2001 From: Penry Date: Sun, 7 Jun 2026 21:14:02 +0200 Subject: [PATCH 8/9] Adpated Workflow for Nightly Build --- .gitea/workflows/linux_arm64_docker.yaml | 40 ++++++++++++++---------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/.gitea/workflows/linux_arm64_docker.yaml b/.gitea/workflows/linux_arm64_docker.yaml index ac09cb0..77b952e 100644 --- a/.gitea/workflows/linux_arm64_docker.yaml +++ b/.gitea/workflows/linux_arm64_docker.yaml @@ -4,7 +4,6 @@ on: push: branches: - main - - Test-Branch jobs: build-docker-linux-arm64: @@ -31,28 +30,35 @@ jobs: - name: Build version shell: bash run: | - COMMIT_COUNT=$(git rev-list $(git describe --tags --abbrev=0)..HEAD --count) - echo "Commit Count: $COMMIT_COUNT" + LAST_TAG=$(git describe --tags --abbrev=0) - - name: Set .NET version variables - shell: bash - run: | - set -euo pipefail - - SEMVER="${VERSION}" - BASE_NUMERIC=$(echo "$SEMVER" | sed -E 's/^([0-9]+\.[0-9]+\.[0-9]+).*/\1/') - BUILD_NO=$(echo "$SEMVER" | grep -oE '[0-9]+$' || echo "0") - - echo "PACKAGE_VERSION=$SEMVER" >> "$GITHUB_ENV" - echo "ASSEMBLY_VERSION=${BASE_NUMERIC}.0" >> "$GITHUB_ENV" - echo "FILE_VERSION=${BASE_NUMERIC}.${BUILD_NO}" >> "$GITHUB_ENV" - echo "INFORMATIONAL_VERSION=$SEMVER" >> "$GITHUB_ENV" + if [[ -z "${LAST_TAG:-}" ]]; then + echo "No tag found" + exit 1 + fi + + COMMIT_COUNT=$(git rev-list $LAST_TAG..HEAD --count) + + if [[ "$LAST_TAG" == *-* ]]; then + TEMP_LAST_TAG ="${LAST_TAG%-*}" + VERSION="${TEMP_LAST_TAG}-nightly.${COMMIT_COUNT}" + else + VERSION="$[LAST_TAG}-nightly.${COMMIT_COUNT}" + fi + + echo "LAST_TAG=$LAST_TAG" >> "$GITHUB_ENV" + echo "COMMIT_COUNT=$COMMIT_COUNT" >> "$GITHUB_ENV" + echo "VERSION=$VERSION" >> "$GITHUB_ENV" + + echo "Last tag: $LAST_TAG" + echo "Commit count: $COMMIT_COUNT" + echo "Final version: $VERSION" - name: Build Linux ARM64 Docker Image run: | docker build \ -t gitea.penry.de/${{ env.REPO_LC }}:nightly \ - --build-arg VERSION=${{ env.PACKAGE_VERSION }} \ + --build-arg VERSION=${{ env.VERSION }} \ . - name: Login to own image registry From a4d7269f8fc682795fd8cfb3cc4a7fc48fd2a146 Mon Sep 17 00:00:00 2001 From: Penry Date: Sun, 7 Jun 2026 21:15:46 +0200 Subject: [PATCH 9/9] Adapted Release Workflow --- .gitea/workflows/linux_arm64_docker-release.yaml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.gitea/workflows/linux_arm64_docker-release.yaml b/.gitea/workflows/linux_arm64_docker-release.yaml index da3ac01..6a27489 100644 --- a/.gitea/workflows/linux_arm64_docker-release.yaml +++ b/.gitea/workflows/linux_arm64_docker-release.yaml @@ -24,13 +24,6 @@ jobs: echo "VERSION=$VERSION" >> $GITHUB_ENV echo "REPO_LC=${GITHUB_REPOSITORY,,}" >> $GITHUB_ENV - - name: Login to own image registry - uses: docker/login-action@v3 - with: - registry: gitea.penry.de - username: ${{ secrets.REGISTRY_USER }} - password: ${{ secrets.REGISTRY_PASSWORD }} - - name: Setup .NET10 uses: actions/setup-dotnet@v3 with: @@ -42,8 +35,16 @@ jobs: -t gitea.penry.de/${{ env.REPO_LC }}:${{ env.VERSION }} \ -t gitea.penry.de/${{ env.REPO_LC }}:latest \ --label "org.opencontainers.image.source=https://gitea.penry.de/${{ github.repository }}" \ + --build-arg VERSION=${{ env.VERSION }} \ . + - name: Login to own image registry + uses: docker/login-action@v3 + with: + registry: gitea.penry.de + username: ${{ secrets.REGISTRY_USER }} + password: ${{ secrets.REGISTRY_PASSWORD }} + - name: Push Images run: | docker push gitea.penry.de/${{ env.REPO_LC }}:${{ env.VERSION }}