feat: log parsed commands and step summary (#2761)
* feat: log parsed command data in json logger * Could be used to upload the GITHUB_STEP_SUMMARY by downstream Projects * You can see the summary and other commands * Access the raw line of most commands * Update step.go * Update step.go * Update push.yml * . --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
27
pkg/runner/testdata/stepsummary/push.yml
vendored
Normal file
27
pkg/runner/testdata/stepsummary/push.yml
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
name: Step Summary Example
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
create_summary:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# GITHUB_STEP_SUMMARY test
|
||||
- name: Create Step Summary
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const summary = `
|
||||
## Workflow Summary
|
||||
- **Repository**: ${context.repo.owner}/${context.repo.repo}
|
||||
- **Branch**: ${context.ref}
|
||||
- **Commit SHA**: ${context.sha}
|
||||
- **Event**: ${context.eventName}
|
||||
`;
|
||||
console.log('Summary:', summary);
|
||||
await core.summary.addRaw(summary);
|
||||
await core.summary.write();
|
||||
github-token: none
|
||||
Reference in New Issue
Block a user