Skip to content

Commit c1050ba

Browse files
authored
feat: enhance package name display in workflow summary (#7)
- Updated the workflow to conditionally format the package name in the GitHub step summary. If the npm registry is the public npm registry, the package name is now displayed as a clickable link to its npm page. This improves visibility and accessibility for users reviewing the workflow summary. Signed-off-by: Jonathan Kilzi <jkilzi@redhat.com>
1 parent 4107148 commit c1050ba

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/generate-and-publish.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,11 @@ jobs:
154154
echo "" >> $GITHUB_STEP_SUMMARY
155155
echo "| Property | Value |" >> $GITHUB_STEP_SUMMARY
156156
echo "|----------|-------|" >> $GITHUB_STEP_SUMMARY
157-
echo "| Package Name | \`${{ inputs.package-name }}\` |" >> $GITHUB_STEP_SUMMARY
157+
if [[ "${{ inputs.npm-registry }}" == "https://registry.npmjs.org" ]]; then
158+
echo "| Package Name | [\`${{ inputs.package-name }}\`](https://www.npmjs.com/package/${{ inputs.package-name }}) |" >> $GITHUB_STEP_SUMMARY
159+
else
160+
echo "| Package Name | \`${{ inputs.package-name }}\` |" >> $GITHUB_STEP_SUMMARY
161+
fi
158162
echo "| Version | \`${{ inputs.package-version }}\` |" >> $GITHUB_STEP_SUMMARY
159163
echo "| Generator | \`typescript-fetch\` |" >> $GITHUB_STEP_SUMMARY
160164
echo "| Dry Run | ${{ inputs.dry-run }} |" >> $GITHUB_STEP_SUMMARY

0 commit comments

Comments
 (0)