From 50ea36d6d048ac6e5eb300a062d66c1ac4e6dad1 Mon Sep 17 00:00:00 2001 From: David Zuelke Date: Wed, 29 Nov 2023 15:31:58 +0100 Subject: [PATCH] Fix output heading for package removal workflow when using dry-run mode The conditional has no else block, so GitHub will print 'false' instead of nothing, and as a result, the heading would read: > Packagesfalse removed from production bucket --- .github/workflows/platform-remove.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/platform-remove.yml b/.github/workflows/platform-remove.yml index 050d214c3..f8c239abd 100644 --- a/.github/workflows/platform-remove.yml +++ b/.github/workflows/platform-remove.yml @@ -73,7 +73,7 @@ jobs: (yes 2>/dev/null || true) | docker run --rm -i --env-file=support/build/_docker/env.default heroku-php-build-${{inputs.stack}}:${{github.sha}} remove.sh ${{inputs.manifests}} 2>&1 | tee remove.out - name: Output job summary run: | - echo '## Packages${{ inputs.dry-run == true && ' which would be' }} removed from production bucket' >> "$GITHUB_STEP_SUMMARY" + echo '## Packages${{ inputs.dry-run == true && ' which would be' || '' }} removed from production bucket' >> "$GITHUB_STEP_SUMMARY" echo "${{ inputs.dry-run == true && '**This is output from a dry-run**, no packages have been removed:' || '-n' }}" >> "$GITHUB_STEP_SUMMARY" echo '```' >> "$GITHUB_STEP_SUMMARY" sed -n '/The following packages will/,$p' remove.out >> "$GITHUB_STEP_SUMMARY"