Add summary parameter to action (#3958)
This commit is contained in:
parent
d291c2338c
commit
a7643fac8d
@ -43,7 +43,8 @@
|
|||||||
|
|
||||||
### Integrations
|
### Integrations
|
||||||
|
|
||||||
<!-- For example, Docker, GitHub Actions, pre-commit, editors -->
|
- The summary output for GitHub workflows is now suppressible using the `summary`
|
||||||
|
parameter. (#3958)
|
||||||
|
|
||||||
### Documentation
|
### Documentation
|
||||||
|
|
||||||
|
14
action.yml
14
action.yml
@ -27,6 +27,10 @@ inputs:
|
|||||||
description: 'Python Version specifier (PEP440) - e.g. "21.5b1"'
|
description: 'Python Version specifier (PEP440) - e.g. "21.5b1"'
|
||||||
required: false
|
required: false
|
||||||
default: ""
|
default: ""
|
||||||
|
summary:
|
||||||
|
description: "Whether to add the output to the workflow summary"
|
||||||
|
required: false
|
||||||
|
default: true
|
||||||
branding:
|
branding:
|
||||||
color: "black"
|
color: "black"
|
||||||
icon: "check-circle"
|
icon: "check-circle"
|
||||||
@ -47,10 +51,12 @@ runs:
|
|||||||
# Display the raw output in the step
|
# Display the raw output in the step
|
||||||
echo "${out}"
|
echo "${out}"
|
||||||
|
|
||||||
# Display the Markdown output in the job summary
|
if [ "${{ inputs.summary }}" == "true" ]; then
|
||||||
echo "\`\`\`python" >> $GITHUB_STEP_SUMMARY
|
# Display the Markdown output in the job summary
|
||||||
echo "${out}" >> $GITHUB_STEP_SUMMARY
|
echo "\`\`\`python" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
|
echo "${out}" >> $GITHUB_STEP_SUMMARY
|
||||||
|
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
|
||||||
|
fi
|
||||||
|
|
||||||
# Exit with the exit-code returned by Black
|
# Exit with the exit-code returned by Black
|
||||||
exit ${exit_code}
|
exit ${exit_code}
|
||||||
|
Loading…
Reference in New Issue
Block a user