dotnet-gha-patterns

Compose reusable GitHub Actions workflows for .NET build, test, and deployment automation.

Updated Aug 16, 2025
One-click install
npx skills add https://github.com/dodyg/blue-nile-pds --skill dotnet-gha-patterns-dodyg
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-gha-patterns
Source: https://github.com/dodyg/blue-nile-pds/tree/main/.agents/skills/dotnet-gha-patterns
Command: npx skills add https://github.com/dodyg/blue-nile-pds --skill dotnet-gha-patterns-dodyg

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Many .NET teams struggle to create consistent, efficient CI/CD pipelines in GitHub Actions, dealing with repetitive boilerplate for reusable workflows, caching, matrix builds, and environment protection.

Core Features & Use Cases

  • Reusable Workflows (workflow_call) to share build, test, and deployment logic across repositories.
  • Composite Actions for shared setup steps such as .NET SDK installation and NuGet caching.
  • Matrix Builds that run tests across multiple target frameworks and operating systems.
  • Path‑Based Triggers to run CI only when relevant code changes.
  • Concurrency and Environment Controls to prevent duplicate runs and enforce deployment approvals.
  • Caching Strategies for NuGet packages, .NET SDK, and build outputs to speed up pipelines.

Quick Start

Ask the skill to generate a reusable GitHub Actions workflow for building a .NET solution with caching.

Frequently Asked Questions about dotnet-gha-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create reusable GitHub Actions workflows for .NET CI/CD?

You can create reusable workflows using the workflow_call trigger to share build, test, and deployment logic across multiple .NET repositories, eliminating repetitive CI/CD boilerplate. Composite actions can also encapsulate shared setup steps like SDK installation.

What is the best way to cache NuGet packages in GitHub Actions for dotnet?

The best approach is implementing caching strategies for NuGet packages, .NET SDK, and build outputs within your GitHub Actions workflows. This caching speeds up dotnet pipelines significantly by reusing previously downloaded dependencies across workflow runs.

How do matrix builds work for testing .NET projects across multiple operating systems?

Matrix builds run tests across multiple target frameworks and operating systems simultaneously by defining configuration arrays in your GitHub Actions workflow. This ensures your .NET project validates compatibility across different environments concurrently.

How can I prevent duplicate GitHub Actions runs when pushing to the same branch?

Concurrency and environment controls prevent duplicate GitHub Actions runs by using concurrency groups to cancel outdated in-progress workflows. This ensures only the latest commit triggers a full CI/CD pipeline, saving build minutes.

Can I trigger GitHub Actions only when specific .NET source files change?

Path-based triggers allow you to run GitHub Actions CI only when relevant .NET code changes, preventing unnecessary pipeline executions. You configure path filters in your workflow triggers to restrict builds to specific directories or files.

Does GitHub Actions support environment protection rules for .NET deployments?

Yes, environment protection rules enforce deployment approvals and restrict deployments to specific branches or environments in GitHub Actions. You can configure environment controls within your reusable .NET deployment workflows to gate production releases.