From 6a6eb412ae5b3da6d140a195e8e9816e321dd2b4 Mon Sep 17 00:00:00 2001 From: AzuTear Date: Fri, 26 Jun 2026 18:30:59 +0200 Subject: [PATCH] Harden Gitea CI resource usage --- .gitea/workflows/ci.yaml | 63 +++++++++++++----------------------- .gitea/workflows/deploy.yaml | 1 + 2 files changed, 23 insertions(+), 41 deletions(-) diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index e184b01..a8424d4 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -12,47 +12,10 @@ on: branches: [main] jobs: - backend: - name: Backend (.NET) - runs-on: linux - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup .NET SDK - uses: actions/setup-dotnet@v4 - with: - dotnet-version: '8.0.x' - - - name: Restore - run: dotnet restore Backend/Backend.csproj - - - name: Build - run: dotnet build Backend/Backend.csproj --no-restore --configuration Release - - frontend: - name: Frontend (Vue/TS) - runs-on: linux - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: '24' - - - name: Install dependencies - run: npm ci - working-directory: frontend - - - name: Build - run: npm run build - working-directory: frontend - - hygiene: - name: Repository Hygiene - runs-on: linux + verify: + name: Build, Typecheck & Hygiene + runs-on: ubuntu-latest + timeout-minutes: 20 steps: - name: Checkout uses: actions/checkout@v4 @@ -82,3 +45,21 @@ jobs: echo "$hits" exit 1 fi + + - name: Backend build + run: | + set -euo pipefail + docker run --rm \ + -v "${{ gitea.workspace }}:/workspace" \ + -w /workspace \ + mcr.microsoft.com/dotnet/sdk:8.0-alpine \ + sh -lc 'dotnet restore Backend/Backend.csproj && dotnet build Backend/Backend.csproj --no-restore --configuration Release' + + - name: Frontend build + run: | + set -euo pipefail + docker run --rm \ + -v "${{ gitea.workspace }}:/workspace" \ + -w /workspace/frontend \ + node:24-alpine \ + sh -lc 'npm ci && npm run build' diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 7788fa6..b51cda2 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -27,6 +27,7 @@ jobs: deploy: name: Deploy to award.noveria.net runs-on: ubuntu-latest + timeout-minutes: 30 if: | github.event_name == 'workflow_dispatch' || (github.event_name == 'workflow_run' &&