Describe the bug
Despite calling await core.summary.write(), the Step Summary is not being generated or displayed in the GitHub Actions UI. Even though the logs indicate the script has finished successfully, the summary remains empty.
To Reproduce
jobs:
tests:
runs-on: self-hosted
container:
image: ubuntu
steps:
- uses: actions/checkout@v4
- uses: actions/github-script@v7
with:
script: |
const script = require('./scripts/sample.js')
await script({github, context, core})
console.log('completed all jobs.')
// sample.js
module.exports = async ({github, context, core}) => {
let rowsA = ['a', 'b', 'c']
core.summary.addRaw(`## RowsA`).addEOL()
for (const row of rowsA) {
core.summary.addRaw(`### ${row}`, true).addEOL()
}
console.log('rowsA add raw')
let rowsB = ['d', 'e', 'f']
core.summary.addRaw(`## RowsB`).addEOL()
for (const row of rowsB) {
core.summary.addRaw(`### ${row}`, true).addEOL()
}
console.log('rowsB add raw')
console.log("Summary content before write:", core.summary.stringify());
await core.summary.write({overwrite: true})
console.log("Summary content after write:", core.summary.stringify());
console.log('process is completed.')
}
Expected behavior
The content is written at summary.
Additional context
The logs show "process is completed," confirming that await core.summary.write() was reached and executed without throwing any errors. However, the summary tab in the GitHub UI does not appear or shows no content.
After await core.summary.write({overwrite: true}), wait about 20 seconds and it will be written.
Describe the bug
Despite calling
await core.summary.write(), the Step Summary is not being generated or displayed in the GitHub Actions UI. Even though the logs indicate the script has finished successfully, the summary remains empty.To Reproduce
Expected behavior
The content is written at summary.
Additional context
The logs show "process is completed," confirming that await core.summary.write() was reached and executed without throwing any errors. However, the summary tab in the GitHub UI does not appear or shows no content.
After
await core.summary.write({overwrite: true}), wait about 20 seconds and it will be written.