[release/v7.5] Convert Azure DevOps Linux Packaging pipeline to GitHub Actions workflow#26391
Merged
TravisEz13 merged 1 commit intoPowerShell:release/v7.5from Nov 5, 2025
Conversation
…low (PowerShell#26225) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: TravisEz13 <10873629+TravisEz13@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR enables Linux packaging in the GitHub Actions CI workflow by fixing permission issues and implementing proper artifact handling. The packaging job was previously commented out due to gem installation permission errors.
Key Changes:
- Fixed gem installation permission issues by detecting GitHub Actions environment and using sudo
- Enabled and configured the
linux_packagingjob in the Linux CI workflow - Modernized the linux-packaging action with proper artifact handling and simplified extraction logic
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
build.psm1 |
Added $env:GITHUB_ACTIONS check to use sudo for gem installation in GitHub Actions, fixing permission errors |
.github/workflows/linux-ci.yml |
Uncommented and enabled the linux_packaging job with proper dependencies and configuration |
.github/actions/test/linux-packaging/action.yml |
Complete rewrite to use PowerShell for artifact extraction, add .NET setup, sync tags, and use GitHub Actions artifact upload |
Comments suppressed due to low confidence (1)
.github/actions/test/linux-packaging/action.yml:1
- This packaging step violates the 'Build and Packaging Steps Pattern' guideline. The
Invoke-CIFinishfunction on Linux/macOS callsNew-LinuxPackagewhich internally runsStart-PSBuild(line 884 in tools/ci.psm1), but PSOptions are being restored from a separate build step without the build artifacts. According to guideline 1000002, you must either: (1) Run build and packaging in the same step, OR (2) Properly save and restore PSOptions AND ensure build artifacts are available. Currently, you're restoring PSOptions but the build may not have the correct binaries for packaging. Consider callingStart-PSBuildbefore packaging or ensuring the extracted binaries match what PSOptions expects.
name: linux_packaging
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
daxian-dbw
approved these changes
Nov 5, 2025
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.
Backport of #26225 to release/v7.5
Triggered by @TravisEz13 on behalf of @copilot-swe-agent
Original CL Label: CL-BuildPackaging
/cc @PowerShell/powershell-maintainers
Impact
Tooling Impact
This PR converts the Azure DevOps Linux Packaging pipeline to GitHub Actions workflow, enabling Linux packaging in the CI pipeline. The change:
linux-packagingcomposite action to use GitHub Actions equivalents for all Azure DevOps-specific taskslinux_packagingjob in the Linux CI workflowInstall-GlobalGemto detect GitHub Actions environmentRegression
This is not a regression fix, but rather an enhancement to enable Linux packaging in GitHub Actions.
Testing
The original PR was tested through the GitHub Actions CI pipeline. The backport maintains the same functionality and testing approach:
.github/workflows/linux-ci.yml(the job was commented out in 7.5 but is enabled by this PR)Risk
High Risk - This change affects the build and packaging infrastructure:
The risk is mitigated by:
Merge Conflicts
One merge conflict occurred in
.github/workflows/linux-ci.yml:linux_packagingjob commented out due to previous gem permission errorslinux_packagingto ready_to_merge dependencies, uncommented the job, updated to use ubuntu-latest and actions/checkout@v5 with fetch-depth: 0