From 66c9a11210cdc967893d9580b5481a62de526f1c Mon Sep 17 00:00:00 2001 From: Matthew Phillips Date: Thu, 22 Sep 2022 16:47:57 -0400 Subject: [PATCH] Use outputs --- .github/workflows/block-merge.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/block-merge.yml b/.github/workflows/block-merge.yml index 3e7c13255..7f680659f 100644 --- a/.github/workflows/block-merge.yml +++ b/.github/workflows/block-merge.yml @@ -25,16 +25,19 @@ jobs: .changeset/**/*.md - name: Check if any changesets contain minor changes + id: find-blockers run: | - echo "Listing changed files..." + echo "Checking for changesets marked as minor" + echo '::set-output name=found::false' for file in ${{ steps.changed-files.outputs.all_changed_files }}; do - echo "$file was changed" if grep -q "'astro': minor" "$file"; then + echo '::set-output name=found::true' echo "$file has a minor release tag" fi done - name: Send PR review + if: steps.find-blockers.outputs.found == 'true' run: | # approve the pull request curl --request POST \ --url https://api.github.com/repos/${{github.repository}}/pulls/${{github.event.number}}/reviews \