5 Commits

Author SHA1 Message Date
53bd0e107e removed gitlab ci
All checks were successful
Portfolio CI/CD / build (push) Successful in 57s
Portfolio CI/CD / test (push) Successful in 1m18s
Portfolio CI/CD / publish (push) Has been skipped
2026-02-20 23:14:33 +01:00
c85a6ec46f restored files from lfs 2026-02-20 23:12:57 +01:00
6b6a1bce7e Removed lfs
All checks were successful
Portfolio CI/CD / build (push) Successful in 1m16s
Portfolio CI/CD / test (push) Successful in 1m20s
Portfolio CI/CD / publish (push) Successful in 2m56s
2026-02-20 22:58:47 +01:00
2634daf800 Fixed pipeline
Some checks failed
Portfolio CI/CD / build (push) Successful in 1m8s
Portfolio CI/CD / test (push) Successful in 1m23s
Portfolio CI/CD / publish (push) Failing after 41s
2026-02-20 22:47:54 +01:00
eeb6e5de6a Added ordering for timeline entries
Some checks failed
Portfolio CI/CD / build (push) Failing after 17s
Portfolio CI/CD / test (push) Has been skipped
Portfolio CI/CD / publish (push) Has been skipped
2026-02-20 22:43:54 +01:00
7 changed files with 67 additions and 47 deletions

1
.gitattributes vendored
View File

@@ -1 +0,0 @@
*.png filter=lfs diff=lfs merge=lfs -text

65
.gitea/workflows/ci.yml Normal file
View File

@@ -0,0 +1,65 @@
name: Portfolio CI/CD
on:
push:
branches: [ "*" ]
tags: [ "*" ]
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.x'
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: dotnet restore
- name: Build Projects
run: dotnet build --configuration Release --no-restore
test:
runs-on: ubuntu-latest
needs: build
steps:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.x'
- name: Checkout
uses: actions/checkout@v4
- name: Test
run: dotnet test --verbosity normal
publish:
runs-on: ubuntu-latest
needs: build
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to registry
run: |
echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login git.leon-hoppe.de \
-u leon.hoppe --password-stdin
- name: Build backend image
run: docker build -t git.leon-hoppe.de/leon.hoppe/portfolio/backend:latest -f src/Portfolio.Api/Dockerfile .
- name: Build frontend image
run: docker build -t git.leon-hoppe.de/leon.hoppe/portfolio/frontend:latest -f src/Portfolio.Web/Dockerfile .
- name: Push backend image
run: docker push git.leon-hoppe.de/leon.hoppe/portfolio/backend:latest
- name: Push frontend image
run: docker push git.leon-hoppe.de/leon.hoppe/portfolio/frontend:latest

View File

@@ -1,44 +0,0 @@
stages:
- build
- test
- publish
variables:
DOCKER_IMAGE: registry.leon-hoppe.de/leon.hoppe/portfolio
build:
stage: build
image: mcr.microsoft.com/dotnet/sdk:10.0
script:
- dotnet restore
- dotnet build --configuration Release --no-restore
artifacts:
paths:
- "**/bin/Release"
expire_in: 10 minutes
test:
stage: test
image: mcr.microsoft.com/dotnet/sdk:10.0
script:
- dotnet test --verbosity normal
dependencies:
- build
publish:
stage: publish
tags:
- docker
before_script:
- git lfs pull
script:
- export VERSION=$(echo $CI_COMMIT_TAG | sed 's/^v//')
- echo "$CI_REGISTRY_PASSWORD" | docker login -u "$CI_REGISTRY_USER" --password-stdin registry.leon-hoppe.de
- docker build -t $DOCKER_IMAGE/api:$VERSION -t $DOCKER_IMAGE/api:latest -f src/Portfolio.Api/Dockerfile .
- docker build -t $DOCKER_IMAGE/web:$VERSION -t $DOCKER_IMAGE/web:latest -f src/Portfolio.Web/Dockerfile .
- docker push $DOCKER_IMAGE/api:$VERSION
- docker push $DOCKER_IMAGE/web:$VERSION
- docker push $DOCKER_IMAGE/api:latest
- docker push $DOCKER_IMAGE/web:latest
only:
- tags

View File

@@ -10,7 +10,7 @@ internal sealed class TimelineRepository(IHttpClientFactory factory) : ITimeline
if (!result.IsSuccessStatusCode) return []; if (!result.IsSuccessStatusCode) return [];
var data = await result.Content.ReadFromJsonAsync<IEnumerable<TimelineEntry>>(ct); var data = await result.Content.ReadFromJsonAsync<IEnumerable<TimelineEntry>>(ct);
return data ?? []; return data?.OrderBy(t => t.Date) ?? Enumerable.Empty<TimelineEntry>();
} }
public async Task<IEnumerable<TimelineEntry>> GetFeaturedTimeline(CancellationToken ct) { public async Task<IEnumerable<TimelineEntry>> GetFeaturedTimeline(CancellationToken ct) {
@@ -19,6 +19,6 @@ internal sealed class TimelineRepository(IHttpClientFactory factory) : ITimeline
if (!result.IsSuccessStatusCode) return []; if (!result.IsSuccessStatusCode) return [];
var data = await result.Content.ReadFromJsonAsync<IEnumerable<TimelineEntry>>(ct); var data = await result.Content.ReadFromJsonAsync<IEnumerable<TimelineEntry>>(ct);
return data ?? []; return data?.OrderBy(t => t.Date) ?? Enumerable.Empty<TimelineEntry>();
} }
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 128 B

After

Width:  |  Height:  |  Size: 591 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 B

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 B

After

Width:  |  Height:  |  Size: 1.4 KiB