Pipeline update for act runner cache and registration endpoint name change
All checks were successful
Gitea CI/CD / dotnet-build-and-test (push) Successful in 10m40s
Gitea CI/CD / Set Tag Name (push) Successful in 5s
Gitea CI/CD / docker-build-and-push (push) Successful in 13m9s
Gitea CI/CD / Create Tag (push) Successful in 5s

This commit is contained in:
2026-01-08 08:58:57 +01:00
parent ae8b60687a
commit 31da3d14a3
2 changed files with 43 additions and 16 deletions

View File

@@ -25,12 +25,14 @@ jobs:
with: with:
submodules: false submodules: false
- name: List files for debugging # NuGet Cache
run: | - name: Cache NuGet packages
pwd uses: actions/cache@v3
ls -la with:
find . -name "*.csproj" path: ~/.nuget/packages
find . -name "*.sln" key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Setup .NET SDK - name: Setup .NET SDK
uses: actions/setup-dotnet@v3 uses: actions/setup-dotnet@v3
@@ -40,10 +42,16 @@ jobs:
- name: Restore dependencies - name: Restore dependencies
run: dotnet restore watcher-monitoring.sln run: dotnet restore watcher-monitoring.sln
- name: Build
run: dotnet build watcher-monitoring.sln --configuration Release --no-restore
- name: Test
run: dotnet test watcher-monitoring.sln --no-build --verbosity normal
continue-on-error: true
set-tag: set-tag:
name: Set Tag Name name: Set Tag Name
needs: [dotnet-build-and-test] needs: [dotnet-build-and-test]
#if: ${{ !failure() && !cancelled() && github.event_name != 'pull_request' }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
outputs: outputs:
tag_name: ${{ steps.set_tag.outputs.tag_name }} tag_name: ${{ steps.set_tag.outputs.tag_name }}
@@ -105,6 +113,15 @@ jobs:
- name: Setup Docker Buildx - name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2 uses: docker/setup-buildx-action@v2
# Docker Layer Cache
- name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Login to Gitea Container Registry - name: Login to Gitea Container Registry
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
@@ -112,13 +129,23 @@ jobs:
username: ${{ secrets.AUTOMATION_USERNAME }} username: ${{ secrets.AUTOMATION_USERNAME }}
password: ${{ secrets.AUTOMATION_PASSWORD }} password: ${{ secrets.AUTOMATION_PASSWORD }}
- name: Build and Push Multi-Arch Docker Image - name: Build and Push Docker Image
uses: docker/build-push-action@v5
with:
context: .
platforms: ${{ env.DOCKER_PLATFORMS }}
push: true
tags: ${{ env.REGISTRY_URL }}/triggermeelmo/${{ env.DOCKER_IMAGE_NAME }}:${{ needs.set-tag.outputs.tag_name }}
build-args: |
VERSION=${{ needs.set-tag.outputs.tag_name }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# Workaround für Cache-Größe
- name: Move cache
run: | run: |
docker buildx build \ rm -rf /tmp/.buildx-cache
--platform linux/amd64 \ mv /tmp/.buildx-cache-new /tmp/.buildx-cache
--build-arg VERSION=${{ needs.set-tag.outputs.tag_name }} \
-t ${{ env.REGISTRY_URL }}/triggermeelmo/${{ env.DOCKER_IMAGE_NAME }}:${{ needs.set-tag.outputs.tag_name }} \
--push .
tag: tag:
name: Create Tag name: Create Tag

View File

@@ -20,8 +20,8 @@ public class MonitoringController : Controller
} }
// Registration Endpoint for watcher-agent // Registration Endpoint for watcher-agent
[HttpPost("registration")] [HttpPost("register")]
public async Task<IActionResult> Registration([FromBody] RegistrationDto dto) public async Task<IActionResult> Register([FromBody] RegistrationDto dto)
{ {
// payload check // payload check
if (!ModelState.IsValid) if (!ModelState.IsValid)