From 818c2906e9a51082da7f2ec70565702d622c2987 Mon Sep 17 00:00:00 2001 From: Matt Sturgeon Date: Tue, 28 Jan 2025 12:55:54 +0000 Subject: [PATCH] ci/update: cleanup summary step --- .github/workflows/update.yml | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index d7237b27..9c671755 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -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)