.github/.github/workflows/ci-dotnet.yaml
Adam Moussa 4a6cbfd362
Some checks failed
ci / ci / ci (push) Has been cancelled
Release on reusable change / version (push) Has been cancelled
Release on reusable change / release (push) Has been cancelled
ci(workflows): pin remaining GitHub Actions to SHA (#139)
Mutable tags and the dependency-review v5 branch executed inside every consumer, including OIDC deploy jobs. SHA pins with version comments match the policy scanner and let Renovate advance them.
2026-08-26 18:25:53 -04:00

51 lines
1.4 KiB
YAML

name: CI — .NET
on:
workflow_call:
inputs:
dotnet-version:
description: ".NET SDK version"
type: string
default: "8.0.x"
working-directory:
description: "Directory containing the solution/project"
type: string
default: "."
solution:
description: "Solution or project file to build"
type: string
default: "*.sln"
run-tests:
description: "Run dotnet test"
type: boolean
default: true
permissions:
contents: read
jobs:
ci:
runs-on: ubuntu-latest
timeout-minutes: 20
concurrency:
group: ci-dotnet-${{ github.workflow }}-${{ github.ref }}-${{ inputs.working-directory }}
cancel-in-progress: true
defaults:
run:
working-directory: ${{ inputs.working-directory }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
with:
dotnet-version: ${{ inputs.dotnet-version }}
- name: Restore
run: dotnet restore ${{ inputs.solution }}
- name: Build
run: dotnet build ${{ inputs.solution }} --no-restore --configuration Release
- name: Test
if: ${{ inputs.run-tests }}
run: dotnet test ${{ inputs.solution }} --no-build --configuration Release