10 Commits

Author SHA1 Message Date
Penry e7d1b4b524 Merge pull request 'Adapted Nightly and Release Workflow' (#66) from Test-Branch into main
Build Docker Linux ARM64 / build-docker-linux-arm64 (push) Failing after 8s
Reviewed-on: #66
2026-06-07 21:16:31 +02:00
Penry a4d7269f8f Adapted Release Workflow 2026-06-07 21:15:46 +02:00
Penry c7d741d15b Adpated Workflow for Nightly Build 2026-06-07 21:14:02 +02:00
Penry 6d2a6c5925 Added fetch depth
Build Docker Linux ARM64 / build-docker-linux-arm64 (push) Failing after 8s
2026-06-07 20:41:31 +02:00
Penry 9ccb929553 Added Tags fetching
Build Docker Linux ARM64 / build-docker-linux-arm64 (push) Failing after 8s
2026-06-07 20:34:28 +02:00
Penry 5e086c0598 Fixed Syntax
Build Docker Linux ARM64 / build-docker-linux-arm64 (push) Failing after 8s
2026-06-07 20:32:46 +02:00
Penry a7c86289b3 Adpated Workflow for working only on those Branches
Build Docker Linux ARM64 / build-docker-linux-arm64 (push) Failing after 7s
2026-06-07 20:31:29 +02:00
Penry b2e851d765 Adpated Workflow for Running every Time 2026-06-07 20:30:32 +02:00
Penry 1a1d7dec7c Test 2026-06-07 20:29:44 +02:00
Penry 103da6abe8 Test Commit 2026-06-07 20:27:03 +02:00
3 changed files with 35 additions and 57 deletions
@@ -24,13 +24,6 @@ jobs:
echo "VERSION=$VERSION" >> $GITHUB_ENV echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "REPO_LC=${GITHUB_REPOSITORY,,}" >> $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 - name: Setup .NET10
uses: actions/setup-dotnet@v3 uses: actions/setup-dotnet@v3
with: with:
@@ -42,8 +35,16 @@ jobs:
-t gitea.penry.de/${{ env.REPO_LC }}:${{ env.VERSION }} \ -t gitea.penry.de/${{ env.REPO_LC }}:${{ env.VERSION }} \
-t gitea.penry.de/${{ env.REPO_LC }}:latest \ -t gitea.penry.de/${{ env.REPO_LC }}:latest \
--label "org.opencontainers.image.source=https://gitea.penry.de/${{ github.repository }}" \ --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 - name: Push Images
run: | run: |
docker push gitea.penry.de/${{ env.REPO_LC }}:${{ env.VERSION }} docker push gitea.penry.de/${{ env.REPO_LC }}:${{ env.VERSION }}
+25 -50
View File
@@ -14,6 +14,8 @@ jobs:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Docker Buildx - name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
@@ -28,62 +30,35 @@ jobs:
- name: Build version - name: Build version
shell: bash shell: bash
run: | run: |
set -euo pipefail LAST_TAG=$(git describe --tags --abbrev=0)
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"
- name: Set .NET version variables if [[ -z "${LAST_TAG:-}" ]]; then
shell: bash echo "No tag found"
run: | exit 1
set -euo pipefail fi
SEMVER="${VERSION}" COMMIT_COUNT=$(git rev-list $LAST_TAG..HEAD --count)
BASE_NUMERIC=$(echo "$SEMVER" | sed -E 's/^([0-9]+\.[0-9]+\.[0-9]+).*/\1/')
BUILD_NO=$(echo "$SEMVER" | grep -oE '[0-9]+$' || echo "0") if [[ "$LAST_TAG" == *-* ]]; then
TEMP_LAST_TAG ="${LAST_TAG%-*}"
echo "PACKAGE_VERSION=$SEMVER" >> "$GITHUB_ENV" VERSION="${TEMP_LAST_TAG}-nightly.${COMMIT_COUNT}"
echo "ASSEMBLY_VERSION=${BASE_NUMERIC}.0" >> "$GITHUB_ENV" else
echo "FILE_VERSION=${BASE_NUMERIC}.${BUILD_NO}" >> "$GITHUB_ENV" VERSION="$[LAST_TAG}-nightly.${COMMIT_COUNT}"
echo "INFORMATIONAL_VERSION=$SEMVER" >> "$GITHUB_ENV" 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 - name: Build Linux ARM64 Docker Image
run: | run: |
docker build \ docker build \
-t gitea.penry.de/${{ env.REPO_LC }}:nightly \ -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 - name: Login to own image registry
+2
View File
@@ -6,3 +6,5 @@
There are two options: There are two options:
- latest: Is the latest release Version - latest: Is the latest release Version
- nightly: Is the latest commit on the main branch - nightly: Is the latest commit on the main branch
Test-Commit