chore: Copilot cloud-sandbox setup + dev container (hve-core-all preinstall)#166
Merged
Merged
Conversation
Add a GitHub Copilot cloud-sandbox setup tailored to this repo's .NET 8 + React (Vite) stack, plus a matching dev container, both pre-installing the hve-core-all Copilot CLI plugin from github.com/microsoft/hve-core. - .devcontainer/setup-hve-core.sh: shared best-effort, non-fatal, idempotent installer for the Copilot CLI + hve-core-all plugin - .github/workflows/copilot-setup-steps.yml: copilot-setup-steps job provisioning .NET 8 + Node 20, restoring deps, running the installer - .devcontainer/devcontainer.json: .NET 8 image + Node 20 / docker-in-docker / azure-cli features; postCreateCommand installs deps then the plugin Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 983c6dce-ae9e-479d-ac97-eff813fea0ad
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this adds
A GitHub Copilot cloud-sandbox setup tailored to this repository's stack, plus a matching dev container. Both pre-install the hve-core-all Copilot CLI plugin from microsoft/hve-core. Three files, no other changes:
.devcontainer/setup-hve-core.sh— shared, best-effort, non-fatal, idempotent installer for the Copilot CLI +hve-core-allplugin (set -euo pipefail, executable100755). Every fallible command degrades to a::warning::so the sandbox / dev container still starts on failure..github/workflows/copilot-setup-steps.yml— a singlecopilot-setup-stepsjob (ubuntu-latest,permissions: contents: read) that checks out (persist-credentials: false), provisions .NET 8 + Node 20 (npm cache), restores repo deps (continue-on-error), runs the installer (continue-on-error,env GITHUB_TOKEN: ${{ github.token }}), and prints tool versions. Triggers:workflow_dispatch+push/pull_requestfiltered to this workflow's path..devcontainer/devcontainer.json—.NET 8base image + Node 20 / docker-in-docker / azure-cli features;postCreateCommandinstalls repo deps then runs the installer.Detected stack
Scaffold.sln,TargetFramework=net8.0); local tooldotnet-ef8.0.11src/Scaffold.Web, haspackage-lock.json)docker-compose.yml(SQL Server 2025, Postgres 16), per-service Dockerfilesazure.yaml) + Bicep (infra/).editorconfig→ LF, 2-space indent, final newlineExact build / test / lint commands (from ci.yml)
Backend
Frontend (
src/Scaffold.Web)Action pinning
The new workflow SHA-pins all third-party actions (per the setup requirement), with the version in a trailing comment:
actions/checkout11d5960a326750d5838078e36cf38b85af677262(v4.4.0)actions/setup-dotnet67a3573c9a986a3f9c594539f4ab511d57bb3ce9(v4.3.1)actions/setup-node49933ea5288caeca8642d1e84afbd3f7d6820020(v4.4.0)Note: existing repo workflows (
ci.yml,security.yml) use floating tag pins (@v4); this new workflow intentionally hardens to full commit SHAs.Validation
Copilot Setup Stepsworkflow on a realubuntu-24.04runneractionlinton the workflowjqparse ofdevcontainer.jsonmcr.microsoft.com/devcontainers/dotnet:1-8.0-bookwormbash -n .devcontainer/setup-hve-core.shdevcontainer buildsetup-hve-core.shpath end-to-end)hve-core-all install result — ✅ SUCCESS (cold-start, real runner)
The workflow ran on a fresh GitHub-hosted
ubuntu-24.04runner withGITHUB_TOKEN: contents: readand no pre-installed Copilot CLI, so this exercised the full cold-start path. Verbatim log from the Install hve-core-all plugin step:Verify tools step:
added 3 packages in 4s→ the idempotent guard found nocopilot, sonpm install -g @github/copilotinstalled the CLI cold.Marketplace "hve-core" added successfully→ genuine first-time marketplace add (no fallback needed).hve-core-all@hve-core (v3.3.101)appears incopilot plugin list→ install confirmed.0. The|| echo "::warning::…"fallbacks were not needed here but keep the step non-blocking in any environment.(A local git-bash dry-run on Windows earlier reproduced the same success and additionally confirmed the non-fatal "marketplace already registered" fallback path.)
About the other PR checks
This PR changes only the three files above (
git diff --name-only main...= the 3 files). The repo's existing CI (ci.yml) and Security Scan workflows run onpull_requestwith no path filter, so they execute on this PR as well. The Frontend Build & Typecheck job comes fromci.ymland operates onsrc/Scaffold.Web, which this PR does not touch — any failure there is pre-existing / unrelated to this change and out of scope (three-files-only constraint).Notes