Skip to content

Fix GitHub Actions step summary generation issues#3061

Merged
DRSDavidSoft merged 40 commits intomasterfrom
copilot/fix-github-step-summary
Apr 12, 2026
Merged

Fix GitHub Actions step summary generation issues#3061
DRSDavidSoft merged 40 commits intomasterfrom
copilot/fix-github-step-summary

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Dec 14, 2025

  • Analyze the current issues with GITHUB_STEP_SUMMARY generation
  • Fix the PowerShell echo command issues in build.yml (backticks and variable expansion)
  • Add Cmder version to build workflow summary
  • Fix the PowerShell echo command issues in tests.yml
  • Enhance tests.yml to provide more verbose and useful information
  • Fix the PowerShell echo command issues in codeql.yml
  • Fix the PowerShell echo command issues in vendor.yml (critical Unicode escape error)
  • Test the generated summaries locally with PowerShell to ensure correctness
  • Add clickable links to repository, branch, commit, and actor in build summary
  • Add ISO timestamp for build start time (with code formatting)
  • Add vendor packages table from sources.json with link to sources.json and release links
  • Show full SHA256 hashes (not truncated)
  • Merge artifacts and upload sections into single table with download links
  • Add section separators with --- (removed separator before artifacts)
  • Reduce duplicate emoji usage
  • Fix incomplete summary by initializing $summary variable before appending to it
  • Combine backticks with links for code formatting on clickable values
  • Simplify build success message to "Cmder built successfully"
  • Make artifact filenames clickable download links (removed redundant Download column)
  • Add file type emojis: 📄 for txt files, 🗄️ for archives (zip, rar, 7z), 📦 for other files
  • Fetch real artifact download URLs using GitHub API with retry logic (3 attempts, 2s delay, ⚠️ warning on failure)
  • Fix branch links for PR merge refs (e.g., 3061/merge) to point to PR page instead of invalid tree URL
  • Dynamically discover all build artifacts instead of hardcoding filenames
  • Read vendor directories from sources.json instead of hardcoding them in tests workflow
  • Use human-readable file sizes with binary units (B, KiB, MiB, GiB)
  • Move general-purpose functions to utils.ps1 for reusability
  • Fix vendor package release links to extract tag from download URL
  • Fix artifact download URLs to use browser-accessible GitHub Actions URLs
  • Add workflow_dispatch to enable manual build workflow runs
  • Fix Format-FileSize undefined error by sourcing utils.ps1 in artifacts upload step
  • Fix variable name casing inconsistency in vendor.yml ($Summary -> $summary)
  • Add actual duration tracking to test results (measures execution time in seconds)
  • Change hashes.txt separator from space to tab character for better parsing
  • Show actual branch name and separate PR row in repository information
  • Verify all changes work correctly

Key Features

Direct Artifact Downloads

Implemented intelligent artifact URL fetching using GitHub CLI API:

  • Automatically retrieves direct download links for all build artifacts
  • Retry mechanism with 3 attempts and 2-second delays between retries
  • Graceful fallback to workflow run page with ⚠️ warning indicator if API fails
  • Uses GitHub token authentication for API access
  • Fixed: Artifact URLs now use proper browser-accessible format (https://github.com/owner/repo/actions/runs/{run_id}/artifacts/{artifact_id}) instead of API endpoints that require authentication
  • Artifact filenames are clickable download links for better UX

Dynamic Artifact Discovery

  • Automatically discovers all files in the build directory (excluding hidden files)
  • Sorts artifacts alphabetically for consistent display
  • Supports any file types for future Cmder editions without code changes
  • No hardcoded filenames - adapts to any build output
  • Human-readable file sizes using binary units (B, KiB, MiB, GiB) instead of always showing MB
  • Enhanced: Hash file (hashes.txt) now uses tab separator instead of space for easier parsing and processing

Enhanced Summaries Across All Workflows

  • build.yml: Comprehensive build information with Cmder version, vendor packages with release links, and artifact details with direct downloads
    • Improved: Repository information now shows actual branch name (e.g., copilot/fix-github-step-summary) instead of merge ref (e.g., 3061/merge)
    • New: Separate Pull Request row shows PR number with clickable link when applicable
  • tests.yml: Detailed test environment and results with individual test status, dynamically reads vendor directories from sources.json, now includes actual execution duration in seconds for each test
  • codeql.yml: Security analysis workflow summary
  • vendor.yml: Vendor update workflow with proper Unicode handling and consistent variable naming

Repository Information Display

  • New: For pull requests, shows the actual branch name instead of the merge ref
  • New: Separate "Pull Request" row displays PR number as clickable link (e.g., Fix GitHub Actions step summary generation issues #3061)
  • Improved: Branch links now point to the actual branch tree for PRs
  • Regular branch pushes show only the branch name without a PR row
  • Makes the summary clearer and less confusing for PR builds

Test Duration Tracking

  • New: Each test step (Clink Shell, PowerShell, Bash) now measures and reports actual execution time
  • Duration displayed in seconds with 2 decimal precision
  • Provides valuable performance metrics for test execution
  • Shows "N/A" if duration cannot be measured
  • Helps identify performance regressions in test execution

Vendor Package Display

  • Vendor packages section includes a link to sources.json
  • Each vendor version is clickable and links to the specific release on GitHub
  • Fixed: Automatically extracts the correct release tag from download URLs using regex (handles both /releases/download/ and /archive/ URL formats)
  • Works correctly with version tags that have prefixes (e.g., v1.2.3) or suffixes
  • Tests workflow reads vendor directories from sources.json for consistency

File Type Support

  • Supports zip, rar, and 7z compression formats (🗄️ emoji)
  • Text files display with 📄 emoji
  • Other files display with 📦 emoji

Code Organization

  • Moved general-purpose functions to scripts/utils.ps1 for reusability:
    • Format-FileSize: Formats file sizes with human-readable binary units
    • Get-ArtifactDownloadUrl: Fetches artifact download URLs with retry logic
  • Both functions include comprehensive PowerShell documentation
  • Fixed: Ensured utils.ps1 is sourced in all steps that use its functions
  • Fixed: Consistent variable naming throughout all workflows (lowercase $summary)
  • Improves maintainability and allows reuse across different workflows and scripts

Manual Workflow Trigger

  • Added workflow_dispatch event to build workflow
  • Allows manual triggering of builds from the GitHub Actions UI
  • Useful for testing, debugging, or creating builds on-demand without pushing commits or creating PRs

All workflows now use PowerShell here-strings (@"..."@) instead of echo commands to eliminate Unicode escape sequence errors and ensure proper variable expansion.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI self-assigned this Dec 14, 2025
Co-authored-by: DRSDavidSoft <4673812+DRSDavidSoft@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix generation of GitHub step summary Fix GitHub Actions step summary generation issues Dec 14, 2025
Copilot AI requested a review from DRSDavidSoft December 14, 2025 22:10
@DRSDavidSoft

This comment was marked as resolved.

…es, and merge artifact sections

Co-authored-by: DRSDavidSoft <4673812+DRSDavidSoft@users.noreply.github.com>

This comment was marked as resolved.

…ding

Co-authored-by: DRSDavidSoft <4673812+DRSDavidSoft@users.noreply.github.com>

This comment was marked as resolved.

Co-authored-by: DRSDavidSoft <4673812+DRSDavidSoft@users.noreply.github.com>
@cmderdev cmderdev deleted a comment from Copilot AI Dec 15, 2025
…formation

Co-authored-by: DRSDavidSoft <4673812+DRSDavidSoft@users.noreply.github.com>
@DRSDavidSoft

This comment was marked as resolved.

…s upload step

Agent-Logs-Url: https://github.com/cmderdev/cmder/sessions/bf167f7e-397b-4635-a7d2-2c2680207e67

Co-authored-by: DRSDavidSoft <4673812+DRSDavidSoft@users.noreply.github.com>

This comment was marked as resolved.

This comment was marked as resolved.

DRSDavidSoft and others added 6 commits April 12, 2026 03:42
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@DRSDavidSoft

This comment was marked as resolved.

…ary)

Agent-Logs-Url: https://github.com/cmderdev/cmder/sessions/7c117654-3cc9-428c-846a-01931a2f9b5b

Co-authored-by: DRSDavidSoft <4673812+DRSDavidSoft@users.noreply.github.com>
@DRSDavidSoft

This comment was marked as resolved.

… to tab

Agent-Logs-Url: https://github.com/cmderdev/cmder/sessions/48204621-5da0-4649-9715-ac9df45f1153

Co-authored-by: DRSDavidSoft <4673812+DRSDavidSoft@users.noreply.github.com>

This comment was marked as resolved.

This comment was marked as resolved.

@DRSDavidSoft
Copy link
Copy Markdown
Contributor

@daxgames Thank you indeed for all your fixes to the PR, and sorry I took some time to finish it up. Ready!

@DRSDavidSoft DRSDavidSoft merged commit dc7e1c1 into master Apr 12, 2026
4 checks passed
@DRSDavidSoft DRSDavidSoft deleted the copilot/fix-github-step-summary branch April 12, 2026 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔄️ GitHub Actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants