Make GitHub Workflows work in the internal mirror by TravisEz13 · Pull Request #25275 · PowerShell/PowerShell
PR Summary
This pull request includes several changes to GitHub Actions workflows and the build.psm1 script to improve logging, environment detection, and path filtering. The most important changes are summarized below:
GitHub Actions Workflows Improvements:
.github/actions/infrastructure/path-filters/action.yml: Added a new composite action to filter paths and capture various types of changes in the repository, such as source code, GitHub workflows, tools, props, tests, and build modules..github/actions/test/nix/action.yml: Enhanced logging by addingWrite-LogGroupStartandWrite-LogGroupEndaround several steps to improve readability and organization of logs. [1] [2] [3].github/actions/test/process-pester-results/action.yml: Replaced the JUnit to CTRF conversion step with a summary logging step that captures and logs the test results summary, including total tests, errors, failures, and disabled tests.
Workflow Configuration Updates:
.github/workflows/linux-ci.yml,.github/workflows/macos-ci.yml,.github/workflows/windows-ci.yml: Addedgithub-mirrorbranch to the list of branches to trigger the workflows and updated permissions to includecontents: read. Also, replaced thedorny/paths-filteraction with the newpath-filterscomposite action. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]
Build Script Enhancements:
build.psm1: Added support for Ubuntu 22.04 and 24.04 in the environment detection function and improved logging withWrite-LogGroupfunctions to group log messages and support GitHub Actions log grouping. [1] [2] [3] [4]
PR Context
- Removed use of 3rd party actions in key workflows so the workflows can be used in internal mirrors
- wrote simplified version of these workflows
- Added branch names for our internal mirror.
- Added helpers to write log groups to GitHub workflows
PR Checklist
- PR has a meaningful title
- Use the present tense and imperative mood when describing your changes
- Summarized changes
- Make sure all
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright header - This PR is ready to merge and is not Work in Progress.
- If the PR is work in progress, please add the prefix
WIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.
- If the PR is work in progress, please add the prefix
- Breaking changes
- None
- OR
- Experimental feature(s) needed
- Experimental feature name(s):
- User-facing changes
- Not Applicable
- OR
- Documentation needed
- [ ] Issue filed:
- Testing - New and feature
-
N/A or can only be tested interactively
-
OR
-
Make sure you've added a new test if existing tests do not effectively test the code changed
- Issue filed:
-