Skip to content

Commit 492a7b1

Browse files
authored
chore(workflows): simplify Copilot setup steps workflow triggers (#414)
## Description Streamlined the `copilot-setup-steps.yml` workflow configuration based on MAUI team guidance and official GitHub documentation. The workflow now uses only `workflow_dispatch` for manual validation, aligning with how Copilot coding agent internally executes setup steps (not through visible workflow triggers). Added resilience improvement: `continue-on-error: true` on the npm dependency installation step allows Copilot to start work even when dependencies fail, enabling it to fix `package.json` or `package-lock.json` issues itself. ## Related Issue(s) Closes #411 ## Type of Change Select all that apply: **Code & Documentation:** - [ ] Bug fix (non-breaking change fixing an issue) - [ ] New feature (non-breaking change adding functionality) - [ ] Breaking change (fix or feature causing existing functionality to change) - [ ] Documentation update **Infrastructure & Configuration:** - [x] GitHub Actions workflow - [ ] Linting configuration (markdown, PowerShell, etc.) - [ ] Security configuration - [ ] DevContainer configuration - [ ] Dependency update **AI Artifacts:** - [ ] Reviewed contribution with `prompt-builder` agent and addressed all feedback - [ ] Copilot instructions (`.github/instructions/*.instructions.md`) - [ ] Copilot prompt (`.github/prompts/*.prompt.md`) - [ ] Copilot agent (`.github/agents/*.agent.md`) **Other:** - [ ] Script/automation (`.ps1`, `.sh`, `.py`) - [ ] Other (please describe): ## Sample Prompts (for AI Artifact Contributions) N/A - Infrastructure change only. ## Testing - Verified workflow file syntax is valid YAML - Manual dispatch trigger can be used to validate setup steps work correctly - Copilot session logs will show setup steps execution when agent starts work ## Checklist ### Required Checks - [x] Documentation is updated (if applicable) - [x] Files follow existing naming conventions - [x] Changes are backwards compatible (if applicable) - [ ] Tests added for new functionality (if applicable) ### AI Artifact Contributions N/A - Not an AI artifact contribution. ### Required Automated Checks The following validation commands must pass before merging: - [ ] Markdown linting: `npm run lint:md` - [ ] Spell checking: `npm run spell-check` - [ ] Frontmatter validation: `npm run lint:frontmatter` - [ ] Link validation: `npm run lint:md-links` - [ ] PowerShell analysis: `npm run lint:ps` ## Security Considerations - [x] This PR does not contain any sensitive or NDA information - [ ] Any new dependencies have been reviewed for security issues - [x] Security-related scripts follow the principle of least privilege ## Additional Notes Reference sources for these changes: - [MAUI team Copilot tips](https://devblogs.microsoft.com/dotnet/maui-team-copilot-tips/) - Guidance on `continue-on-error` and workflow structure - [GitHub Docs: Customizing the development environment](https://docs.github.com/en/copilot/how-tos/use-copilot-agents/coding-agent/customize-the-agent-environment) - Official specification 🔧 - Generated by Copilot
1 parent 292ef51 commit 492a7b1

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

.github/workflows/copilot-setup-steps.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,10 @@
77

88
name: "Copilot Setup Steps"
99

10-
# Auto-run on push/PR to validate the setup workflow
10+
# Copilot coding agent runs these steps internally before starting work.
11+
# Use workflow_dispatch to manually validate the setup when desired.
1112
on:
1213
workflow_dispatch:
13-
push:
14-
paths:
15-
- .github/workflows/copilot-setup-steps.yml
16-
pull_request:
17-
paths:
18-
- .github/workflows/copilot-setup-steps.yml
1914

2015
jobs:
2116
# Job MUST be named 'copilot-setup-steps' to be recognized by Copilot
@@ -38,7 +33,10 @@ jobs:
3833
node-version: "20"
3934
cache: "npm"
4035

36+
# continue-on-error allows Copilot to start work even if dependencies fail,
37+
# so it can fix package.json/package-lock.json issues itself
4138
- name: Install JavaScript dependencies
39+
continue-on-error: true
4240
run: npm ci
4341

4442
- name: Set up Python

0 commit comments

Comments
 (0)