ci/update: cleanup summary step

This commit is contained in:
Matt Sturgeon 2025-01-28 12:55:54 +00:00
parent 62a0dfbe5d
commit 818c2906e9
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299

View file

@ -176,24 +176,25 @@ jobs:
- name: Print summary - name: Print summary
if: steps.pr.outputs.pull-request-number if: steps.pr.outputs.pull-request-number
env:
pr_num: ${{ steps.pr.outputs.pull-request-number }}
pr_url: ${{ steps.pr.outputs.pull-request-url }}
pr_branch: ${{ steps.pr.outputs.pull-request-branch }}
head: ${{ steps.pr.outputs.pull-request-head-sha }}
operation: ${{ steps.pr.outputs.pull-request-operation }}
run: | run: |
num="${{ steps.pr.outputs.pull-request-number }}" short=${head:0:6}
pr_url="${{ steps.pr.outputs.pull-request-url }}"
pr_branch="${{ steps.pr.outputs.pull-request-branch }}"
head="${{ steps.pr.outputs.pull-request-head-sha }}"
operation="${{ steps.pr.outputs.pull-request-operation }}"
# stdout # stdout
echo "${head:0:6} pushed to ${pr_branch}" echo "${short} pushed to ${pr_branch}"
echo "${pr} was ${operation}." echo "#${pr_num} was ${operation}: ${pr_url}"
( # markdown summary
# markdown summary echo "## ${{ github.ref_name }}"
echo "## ${{ github.ref_name }}" >> $GITHUB_STEP_SUMMARY echo
echo >> $GITHUB_STEP_SUMMARY echo "\`${short}\` pushed to \`${pr_branch}\`"
echo "\`${head:0:6}\` pushed to \`${pr_branch}\`" >> $GITHUB_STEP_SUMMARY echo
echo >> $GITHUB_STEP_SUMMARY echo "[#${pr_num}](${pr_url}) was ${operation}."
echo "[#${num}](${pr_url}) was ${operation}." >> $GITHUB_STEP_SUMMARY echo
echo >> $GITHUB_STEP_SUMMARY ) >> $GITHUB_STEP_SUMMARY
- name: Print cancellation summary - name: Print cancellation summary
if: (!steps.pr.outputs.pull-request-number) if: (!steps.pr.outputs.pull-request-number)