From b642b8e3d33cb5e9f4ed3582093d472da3cea52d Mon Sep 17 00:00:00 2001 From: Nikolai Emil Damm Date: Tue, 23 Jun 2026 22:26:17 +0200 Subject: [PATCH] ci: add copilot-setup-steps workflow for coding-agent parity Mirror the sibling templates (go-template, platform-template) by provisioning the .NET toolchain the Copilot coding agent needs before it starts. Tracks the SDK floor via global.json so the agent toolchain never drifts (the .NET parity to go-template's go-version-file: go.mod), and self-validates on changes to the file. Part of the template-suite parity theme of #218. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/copilot-setup-steps.yml | 46 +++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/copilot-setup-steps.yml diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml new file mode 100644 index 0000000..5d989ec --- /dev/null +++ b/.github/workflows/copilot-setup-steps.yml @@ -0,0 +1,46 @@ +--- +name: "Copilot Setup Steps" + +# Provision the .NET toolchain the Copilot coding agent needs before it starts, +# mirroring the sibling templates (go-template, platform-template) so adopters +# get a working agent environment out of the box. The setup runs on changes to +# this file (and on manual dispatch) so it is validated like any other workflow. +on: + workflow_dispatch: + push: + paths: + - .github/workflows/copilot-setup-steps.yml + pull_request: + paths: + - .github/workflows/copilot-setup-steps.yml + +permissions: {} + +jobs: + # The job MUST be called `copilot-setup-steps` or Copilot will not pick it up. + copilot-setup-steps: + runs-on: ubuntu-latest + + permissions: + contents: read + + steps: + - name: 🛡️ Harden runner + uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4 + with: + egress-policy: audit + + - name: 📑 Checkout + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + with: + persist-credentials: false + + - name: ⚙️ Set up .NET + uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5.3.0 + with: + # Track global.json so the Copilot toolchain never drifts from the SDK + # floor (the .NET parity to go-template's `go-version-file: go.mod`). + global-json-file: global.json + + - name: 📦 Restore dependencies + run: dotnet restore Example.slnx