Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 8, 2025

Adds $GITHUB_STEP_SUMMARY markdown output to all workflow files to provide at-a-glance status information in the GitHub Actions UI.

Changes

  • build.yml: Repository metadata, build status, artifact table with sizes/hashes, upload confirmation, release details
  • tests.yml: Environment info, vendor initialization status, test results table for each shell (Clink, PowerShell, Bash), completion summary
  • vendor.yml: Dependency update table showing old/new versions, PR creation confirmation
  • branches.yml: Merge operation details and completion status
  • codeql.yml: Analysis configuration, build status, analysis results

Implementation Details

  • All success-reporting steps use if: success() to prevent false positives on failures
  • Artifact processing refactored to use loop instead of duplicated code blocks
  • Hash values truncated to 16 chars for readability (full hashes in hashes.txt)
  • Test results use separate table header step to maintain structure on partial failures

Example Output

- name: Summary - Package artifacts
  if: success()
  shell: pwsh
  run: |
    echo "### 📦 Artifacts Created" >> $env:GITHUB_STEP_SUMMARY
    echo "" >> $env:GITHUB_STEP_SUMMARY
    echo "| Artifact | Size | Hash (SHA256) |" >> $env:GITHUB_STEP_SUMMARY
    echo "| --- | --- | --- |" >> $env:GITHUB_STEP_SUMMARY
    $artifacts = @("cmder.zip", "cmder.7z", "cmder_mini.zip")
    foreach ($artifact in $artifacts) {
      $path = "build/$artifact"
      if (Test-Path $path) {
        $size = (Get-Item $path).Length / 1MB
        $hash = (Get-FileHash $path -Algorithm SHA256).Hash.Substring(0, 16)
        echo "| \`$artifact\` | $([math]::Round($size, 2)) MB | \`$hash...\` |" >> $env:GITHUB_STEP_SUMMARY
      }
    }
Original prompt

Add the missing $GITHUB_STEP_SUMMARY perfectly with useful information in Markdown style to the existing CI/CD tasks to report steps related to each task/step that is needed.


💡 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.

Copilot AI changed the title [WIP] Add missing $GITHUB_STEP_SUMMARY to CI/CD tasks Add GITHUB_STEP_SUMMARY to CI/CD workflows Dec 8, 2025
Copilot AI requested a review from DRSDavidSoft December 8, 2025 20:23
@DRSDavidSoft DRSDavidSoft marked this pull request as ready for review December 8, 2025 20:37
Copilot AI review requested due to automatic review settings December 8, 2025 20:37
@DRSDavidSoft DRSDavidSoft merged commit d05d031 into master Dec 8, 2025
3 checks passed
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds GITHUB_STEP_SUMMARY markdown output to all CI/CD workflow files to provide at-a-glance status information in the GitHub Actions UI. The changes enhance observability by displaying repository metadata, build status, test results, artifact information, and operation details directly in the workflow run summary.

Key Changes

  • Added step summaries to five workflow files (build.yml, tests.yml, vendor.yml, branches.yml, codeql.yml)
  • Implemented conditional if: success() guards on success-reporting steps to prevent false positives
  • Refactored artifact processing in build.yml to use a loop instead of duplicated code blocks

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
.github/workflows/build.yml Adds repository metadata, build status, artifact table with sizes/truncated hashes, upload confirmation, and release details
.github/workflows/tests.yml Adds environment info, vendor initialization status, test results table for each shell, and completion summary
.github/workflows/vendor.yml Adds dependency update table, update count, and PR creation confirmation
.github/workflows/branches.yml Adds merge operation details and completion status using bash shell (correctly escaped)
.github/workflows/codeql.yml Adds analysis configuration, build status, and analysis results summary

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

run: |
echo "### 🚀 Release Information" >> $env:GITHUB_STEP_SUMMARY
echo "" >> $env:GITHUB_STEP_SUMMARY
echo "Draft release created for tag: **\`${{ github.ref_name }}\`**" >> $env:GITHUB_STEP_SUMMARY
Copy link

Copilot AI Dec 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect escape sequence for backticks in PowerShell. The syntax \${{ github.ref_name }}`will output literal backslashes followed by backticks, not markdown-formatted code. In PowerShell, use doubled backticks to escape backticks: change`${{ github.ref_name }}`` to ``${{ github.ref_name }}``.

Suggested change
echo "Draft release created for tag: **\`${{ github.ref_name }}\`**" >> $env:GITHUB_STEP_SUMMARY
echo "Draft release created for tag: **``${{ github.ref_name }}``**" >> $env:GITHUB_STEP_SUMMARY

Copilot uses AI. Check for mistakes.
Comment on lines +59 to +62
echo "| Repository | \`${{ github.repository }}\` |" >> $env:GITHUB_STEP_SUMMARY
echo "| Branch | \`${{ github.ref_name }}\` |" >> $env:GITHUB_STEP_SUMMARY
echo "| Language | \`${{ matrix.language }}\` |" >> $env:GITHUB_STEP_SUMMARY
echo "| Commit | \`${{ github.sha }}\` |" >> $env:GITHUB_STEP_SUMMARY
Copy link

Copilot AI Dec 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect escape sequence for backticks in PowerShell. The syntax \${{ ... }}`will output literal backslashes followed by backticks, not markdown-formatted code. In PowerShell, use doubled backticks to escape backticks: change`${{ github.repository }}`` to ``${{ github.repository }}``, and similarly for the other GitHub Actions expressions on lines 60-62.

Suggested change
echo "| Repository | \`${{ github.repository }}\` |" >> $env:GITHUB_STEP_SUMMARY
echo "| Branch | \`${{ github.ref_name }}\` |" >> $env:GITHUB_STEP_SUMMARY
echo "| Language | \`${{ matrix.language }}\` |" >> $env:GITHUB_STEP_SUMMARY
echo "| Commit | \`${{ github.sha }}\` |" >> $env:GITHUB_STEP_SUMMARY
echo "| Repository | ``${{ github.repository }}`` |" >> $env:GITHUB_STEP_SUMMARY
echo "| Branch | ``${{ github.ref_name }}`` |" >> $env:GITHUB_STEP_SUMMARY
echo "| Language | ``${{ matrix.language }}`` |" >> $env:GITHUB_STEP_SUMMARY
echo "| Commit | ``${{ github.sha }}`` |" >> $env:GITHUB_STEP_SUMMARY

Copilot uses AI. Check for mistakes.
Comment on lines +50 to +54
echo "| Repository | \`${{ github.repository }}\` |" >> $env:GITHUB_STEP_SUMMARY
echo "| Branch | \`${{ github.ref_name }}\` |" >> $env:GITHUB_STEP_SUMMARY
echo "| Commit | \`${{ github.sha }}\` |" >> $env:GITHUB_STEP_SUMMARY
echo "| Actor | @${{ github.actor }} |" >> $env:GITHUB_STEP_SUMMARY
echo "| Workflow | \`${{ github.workflow }}\` |" >> $env:GITHUB_STEP_SUMMARY
Copy link

Copilot AI Dec 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect escape sequence for backticks in PowerShell. The syntax \${{ ... }}`will output literal backslashes followed by backticks, not markdown-formatted code. In PowerShell, use doubled backticks to escape backticks: change`${{ github.repository }}`` to ``${{ github.repository }}``, and similarly for the other GitHub Actions expressions on lines 51-52 and 54.

Suggested change
echo "| Repository | \`${{ github.repository }}\` |" >> $env:GITHUB_STEP_SUMMARY
echo "| Branch | \`${{ github.ref_name }}\` |" >> $env:GITHUB_STEP_SUMMARY
echo "| Commit | \`${{ github.sha }}\` |" >> $env:GITHUB_STEP_SUMMARY
echo "| Actor | @${{ github.actor }} |" >> $env:GITHUB_STEP_SUMMARY
echo "| Workflow | \`${{ github.workflow }}\` |" >> $env:GITHUB_STEP_SUMMARY
echo "| Repository | ``${{ github.repository }}`` |" >> $env:GITHUB_STEP_SUMMARY
echo "| Branch | ``${{ github.ref_name }}`` |" >> $env:GITHUB_STEP_SUMMARY
echo "| Commit | ``${{ github.sha }}`` |" >> $env:GITHUB_STEP_SUMMARY
echo "| Actor | @${{ github.actor }} |" >> $env:GITHUB_STEP_SUMMARY
echo "| Workflow | ``${{ github.workflow }}`` |" >> $env:GITHUB_STEP_SUMMARY

Copilot uses AI. Check for mistakes.
Comment on lines +131 to +134
echo "- ✅ \`cmder.zip\`" >> $env:GITHUB_STEP_SUMMARY
echo "- ✅ \`cmder.7z\`" >> $env:GITHUB_STEP_SUMMARY
echo "- ✅ \`cmder_mini.zip\`" >> $env:GITHUB_STEP_SUMMARY
echo "- ✅ \`hashes.txt\`" >> $env:GITHUB_STEP_SUMMARY
Copy link

Copilot AI Dec 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect escape sequence for backticks in PowerShell. The syntax \cmder.zip`will output literal backslashes followed by backticks, not markdown-formatted code. In PowerShell, use doubled backticks to escape backticks: change`cmder.zip`` to ``cmder.zip``, and similarly for lines 132-134.

Copilot uses AI. Check for mistakes.
Comment on lines +158 to +160
echo "- Full version (\`cmder.zip\`, \`cmder.7z\`)" >> $env:GITHUB_STEP_SUMMARY
echo "- Mini version (\`cmder_mini.zip\`)" >> $env:GITHUB_STEP_SUMMARY
echo "- File hashes (\`hashes.txt\`)" >> $env:GITHUB_STEP_SUMMARY
Copy link

Copilot AI Dec 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect escape sequence for backticks in PowerShell. The syntax \cmder.zip`and similar will output literal backslashes followed by backticks, not markdown-formatted code. In PowerShell, use doubled backticks to escape backticks: change`cmder.zip`to ``` ``cmder.zip`` ```, and similarly forcmder.7z, cmder_mini.zip, and hashes.txt` on lines 158-160.

Copilot uses AI. Check for mistakes.
$size = (Get-Item $path).Length / 1MB
# Truncate hash to first 16 chars for summary readability (full hash in hashes.txt)
$hash = (Get-FileHash $path -Algorithm SHA256).Hash.Substring(0, 16)
echo "| \`$artifact\` | $([math]::Round($size, 2)) MB | \`$hash...\` |" >> $env:GITHUB_STEP_SUMMARY
Copy link

Copilot AI Dec 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect escape sequence for backticks in PowerShell. The syntax \$artifact` will output literal backslashes followed by backticks (`$artifact`), not markdown-formatted code. In PowerShell, use doubled backticks to escape backticks: change `$artifact`to ``` ``$artifact`` ``` and`$hash...`` to ``$hash...``.

Suggested change
echo "| \`$artifact\` | $([math]::Round($size, 2)) MB | \`$hash...\` |" >> $env:GITHUB_STEP_SUMMARY
echo "| ``$artifact`` | $([math]::Round($size, 2)) MB | ``$hash...`` |" >> $env:GITHUB_STEP_SUMMARY

Copilot uses AI. Check for mistakes.
echo "" >> $env:GITHUB_STEP_SUMMARY
echo "A pull request has been created to update the vendor dependencies." >> $env:GITHUB_STEP_SUMMARY
echo "" >> $env:GITHUB_STEP_SUMMARY
echo "**Branch:** \`update-vendor\`" >> $env:GITHUB_STEP_SUMMARY
Copy link

Copilot AI Dec 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect escape sequence for backticks in PowerShell. The syntax \update-vendor` will output literal backslashes followed by backticks (`update-vendor`), not markdown-formatted code. In PowerShell, use doubled backticks to escape backticks: change `update-vendor`` to ``update-vendor``.

Suggested change
echo "**Branch:** \`update-vendor\`" >> $env:GITHUB_STEP_SUMMARY
echo "**Branch:** ``update-vendor``" >> $env:GITHUB_STEP_SUMMARY

Copilot uses AI. Check for mistakes.
Comment on lines +51 to +54
echo "| Repository | \`${{ github.repository }}\` |" >> $env:GITHUB_STEP_SUMMARY
echo "| Branch | \`${{ github.ref_name }}\` |" >> $env:GITHUB_STEP_SUMMARY
echo "| Commit | \`${{ github.sha }}\` |" >> $env:GITHUB_STEP_SUMMARY
echo "| Runner OS | \`${{ runner.os }}\` |" >> $env:GITHUB_STEP_SUMMARY
Copy link

Copilot AI Dec 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect escape sequence for backticks in PowerShell. The syntax \${{ ... }}`will output literal backslashes followed by backticks, not markdown-formatted code. In PowerShell, use doubled backticks to escape backticks: change`${{ github.repository }}`` to ``${{ github.repository }}``, and similarly for the other GitHub Actions expressions on lines 52-54.

Suggested change
echo "| Repository | \`${{ github.repository }}\` |" >> $env:GITHUB_STEP_SUMMARY
echo "| Branch | \`${{ github.ref_name }}\` |" >> $env:GITHUB_STEP_SUMMARY
echo "| Commit | \`${{ github.sha }}\` |" >> $env:GITHUB_STEP_SUMMARY
echo "| Runner OS | \`${{ runner.os }}\` |" >> $env:GITHUB_STEP_SUMMARY
echo "| Repository | ``${{ github.repository }}`` |" >> $env:GITHUB_STEP_SUMMARY
echo "| Branch | ``${{ github.ref_name }}`` |" >> $env:GITHUB_STEP_SUMMARY
echo "| Commit | ``${{ github.sha }}`` |" >> $env:GITHUB_STEP_SUMMARY
echo "| Runner OS | ``${{ runner.os }}`` |" >> $env:GITHUB_STEP_SUMMARY

Copilot uses AI. Check for mistakes.
echo "" >> $env:GITHUB_STEP_SUMMARY
echo "✅ CodeQL security analysis completed successfully." >> $env:GITHUB_STEP_SUMMARY
echo "" >> $env:GITHUB_STEP_SUMMARY
echo "**Language analyzed:** \`${{ matrix.language }}\`" >> $env:GITHUB_STEP_SUMMARY
Copy link

Copilot AI Dec 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect escape sequence for backticks in PowerShell. The syntax \${{ matrix.language }}`will output literal backslashes followed by backticks, not markdown-formatted code. In PowerShell, use doubled backticks to escape backticks: change`${{ matrix.language }}`` to ``${{ matrix.language }}``.

Suggested change
echo "**Language analyzed:** \`${{ matrix.language }}\`" >> $env:GITHUB_STEP_SUMMARY
echo "**Language analyzed:** ``${{ matrix.language }}``" >> $env:GITHUB_STEP_SUMMARY

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants