Skip to content

Commit 73de08e

Browse files
committed
Job summary demo
1 parent 21e91b0 commit 73de08e

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

.github/workflows/job_summary.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Job summary
2+
3+
on:
4+
push:
5+
schedule:
6+
- cron: "0 0 1 * *" # Midnight every month (UTC)
7+
workflow_dispatch:
8+
9+
jobs:
10+
run:
11+
name: Run
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Custom job summary
16+
run: |
17+
echo '# A first-level heading' >> "${GITHUB_STEP_SUMMARY}"
18+
echo '## A second-level heading' >> "${GITHUB_STEP_SUMMARY}"
19+
echo '### A third-level heading' >> "${GITHUB_STEP_SUMMARY}"
20+
21+
{
22+
echo '**bold**'
23+
echo '*italic*'
24+
echo '~strikethru~'
25+
subscript<sub>abc</sub>
26+
superscript<sup>xyz</sup>
27+
<ins>underline</ins>
28+
Link to [GitHub](https://github.com)
29+
![GitHub Logo](https://github.githubassets.com/assets/GitHub-Mark-ea2971cee799.png)
30+
} >> "${GITHUB_STEP_SUMMARY}"

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,22 @@ See the [workflow](.github/workflows/homebrew.yml).
135135

136136
</details>
137137

138+
## job_summary.yml
139+
140+
<details>
141+
142+
<summary>Custom output for the summary page of a workflow run.</summary>
143+
144+
<br/>You can set some custom Markdown for each job so that it will be displayed on the summary page of a workflow run. Job summaries support GitHub flavored Markdown, and you can add your Markdown content for a step to the `GITHUB_STEP_SUMMARY` environment file.
145+
146+
When a job finishes, the summaries for all steps in a job are grouped together into a single job summary and are shown on the workflow run summary page. If multiple jobs generate summaries, the job summaries are ordered by job completion time.
147+
148+
Job summaries are isolated between steps and each step is restricted to a maximum size of 1MB. A maximum of 20 job summaries from steps are displayed per job.
149+
150+
See the [workflow](.github/workflows/job_summary.yml).
151+
152+
</details>
153+
138154
## mise.yml
139155

140156
<details>

0 commit comments

Comments
 (0)