# Build and test on every push (except the CI-maintained `manifest` branch) and on pull requests. # Runner: Gitea act_runner with Docker. The job runs in the .NET 10 SDK image, which has no Node.js, # so JavaScript actions such as actions/checkout cannot run; the checkout uses plain git. name: build on: push: branches-ignore: [manifest] pull_request: permissions: contents: read jobs: build: runs-on: ubuntu-latest container: image: mcr.microsoft.com/dotnet/sdk:10.0 timeout-minutes: 20 defaults: run: shell: bash env: DOTNET_CLI_TELEMETRY_OPTOUT: "1" DOTNET_NOLOGO: "1" steps: - name: Checkout env: TOKEN: ${{ secrets.GITEA_TOKEN }} run: | git config --global --add safe.directory '*' git init -q . git remote add origin "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git" auth="Authorization: basic $(printf 'x-access-token:%s' "$TOKEN" | base64 -w0)" git -c http.extraHeader="$auth" fetch -q --depth 1 origin "$GITHUB_SHA" git checkout -q FETCH_HEAD git log -1 --oneline - name: Restore run: dotnet restore # Directory.Build.props treats warnings as errors in Release. - name: Build run: dotnet build -c Release --no-restore - name: Test run: dotnet test -c Release --no-build