Skip to content

Commit

Permalink
ci/update: cleanup summary step
Browse files Browse the repository at this point in the history
  • Loading branch information
MattSturgeon committed Jan 28, 2025
1 parent 62a0dfb commit 818c290
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,24 +176,25 @@ jobs:
- name: Print summary
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: |
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 }}"
short=${head:0:6}
# stdout
echo "${head:0:6} pushed to ${pr_branch}"
echo "${pr} was ${operation}."
# markdown summary
echo "## ${{ github.ref_name }}" >> $GITHUB_STEP_SUMMARY
echo >> $GITHUB_STEP_SUMMARY
echo "\`${head:0:6}\` pushed to \`${pr_branch}\`" >> $GITHUB_STEP_SUMMARY
echo >> $GITHUB_STEP_SUMMARY
echo "[#${num}](${pr_url}) was ${operation}." >> $GITHUB_STEP_SUMMARY
echo >> $GITHUB_STEP_SUMMARY
echo "${short} pushed to ${pr_branch}"
echo "#${pr_num} was ${operation}: ${pr_url}"
( # markdown summary
echo "## ${{ github.ref_name }}"
echo
echo "\`${short}\` pushed to \`${pr_branch}\`"
echo
echo "[#${pr_num}](${pr_url}) was ${operation}."
echo
) >> $GITHUB_STEP_SUMMARY
- name: Print cancellation summary
if: (!steps.pr.outputs.pull-request-number)
Expand Down

0 comments on commit 818c290

Please sign in to comment.