Supercharging GitHub Actions with Job Summaries

You can now output and group custom Markdown content on the Actions run summary page.

|
| 3 minutes

The same familiar functionality that powers pull requests, issues, and README files has come to GitHub Actions! We’re thrilled to announce GitHub Actions Job Summaries, which allow for custom Markdown content on the run summary generated by each job. Custom Markdown content can be used for a variety of creative purposes, such as:

  • Aggregating and displaying test results
  • Generating reports
  • Custom output independent of logs

Create summaries

Simply output Markdown content to a new environment variable we’ve introduced called $GITHUB_STEP_SUMMARY. Any Markdown content added to this file will then be displayed on the Actions run summary page. That’s it!

steps:
  - name: Adding markdown
    run: echo '### Hello world! @actions/core npm package.

import * as core from '@actions/core' 
  await core.summary
  .addHeading('Test Results')
  .addCodeBlock(generateTestResults(), "js")
  .addTable([
    [{data: 'File', header: true}, {data: 'Result', header: true}],
    ['foo.js', 'Pass ✅'],
    ['bar.js', 'Fail ❌'],
    ['test.js', 'Pass ✅']
  ])
  .addLink('View staging deployment!', 'https://github.com')
  .write()

With the new utility, authors can easily add individual lines or blocks of Markdown. We’ve also made it easy to generate tables, since we envision this being a very common scenario.

For more information, check out our

Markdown tables and hover cards with @mentions

GitHub Actions Community Forum.

We are excited about Job Summaries, and we can’t wait to see how the community will use them.

Thanks! ❤️

Related posts

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant