From 2b0905ec1d58fd72e920a0502cd851ea650e96e2 Mon Sep 17 00:00:00 2001 From: lozy360 Date: Sun, 6 Sep 2026 22:49:36 +0200 Subject: [PATCH] ci: add build + vulnerability check for PRs (gates Renovate auto-merge) Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01Hs9HXPWVtqDukF9MbJKbpw --- .gitea/workflows/ci.yml | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .gitea/workflows/ci.yml diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml new file mode 100644 index 0000000..462b2df --- /dev/null +++ b/.gitea/workflows/ci.yml @@ -0,0 +1,40 @@ +name: CI + +on: + pull_request: + branches: [main] + push: + branches: [main] + +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-latest + env: + DALAMUD_HOME: /tmp/dalamud + PROJECT: GlamourBrowser/GlamourBrowser.csproj + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + - uses: actions/setup-dotnet@v4 + with: + dotnet-version: 10.0.x + - name: Download Dalamud + run: | + wget -q https://goatcorp.github.io/dalamud-distrib/stg/latest.zip -O "$DALAMUD_HOME.zip" + unzip -q "$DALAMUD_HOME.zip" -d "$DALAMUD_HOME" + - name: Restore + run: dotnet restore "$PROJECT" + - name: Build + run: dotnet build --configuration Release "$PROJECT" --no-restore + - name: Fail on vulnerable packages + run: | + out=$(dotnet list "$PROJECT" package --vulnerable --include-transitive 2>&1) + echo "$out" + if echo "$out" | grep -qi 'has the following vulnerable'; then + echo "::error::Vulnerable packages detected"; exit 1 + fi