Merge Main To Nightly
Developmentmerge-main-to-nightlyMerge Main To Nightly is an Agent Skill for development published in the dotnet/dotnet-docker repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Create a PR to merge main into the nightly branch after a .NET containers servicing release. Use when updating the nightly branch post-release or merging main to nightly.
QUICK START
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/dotnet/dotnet-docker/blob/HEAD/.github/skills/merge-main-to-nightly/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/merge-main-to-nightly, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Merge main branch to nightly branch
Workflow
- Determine the release name: Run
pwsh ../shared/Get-ReleaseBranches.ps1to find the latest release branch.- The most recently created branch corresponds to the current release.
- Create a working branch - create a new branch based off of the
nightlybranch, calledmain-to-nightly-$releaseName.git fetch upstream nightly && git checkout -b main-to-nightly-$releaseName upstream/nightly
- Merge main into the branch - merge the
mainbranch into your new branch, fixing any merge conflicts as necessary.git fetch upstream main && git merge upstream/main- If there are merge conflicts, refer to the conflict resolution table below.
- Confirm with the user - Let the user review the changes and the diff.
- Submit the PR - Push the branch to
originand create a PR targeting thenightlybranch.
Conflict resolution
| Conflicting files | Resolution |
|---|---|
src/* | Regenerate Dockerfiles. |
READMEs | Regenerate READMEs. |
manifest.json | Take changes from nightly, ensure preview/nightly tags remain, then regenerate Dockerfiles and READMEs. |
manifest.versions.json | Keep nightly's versions (which are typically newer/preview). Incorporate any structural changes from main. |
| Other files | Stop and consult the user. |