Use outputs
This commit is contained in:
parent
511485fdc6
commit
66c9a11210
1 changed files with 5 additions and 2 deletions
7
.github/workflows/block-merge.yml
vendored
7
.github/workflows/block-merge.yml
vendored
|
@ -25,16 +25,19 @@ jobs:
|
||||||
.changeset/**/*.md
|
.changeset/**/*.md
|
||||||
|
|
||||||
- name: Check if any changesets contain minor changes
|
- name: Check if any changesets contain minor changes
|
||||||
|
id: find-blockers
|
||||||
run: |
|
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
|
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
|
||||||
echo "$file was changed"
|
|
||||||
if grep -q "'astro': minor" "$file"; then
|
if grep -q "'astro': minor" "$file"; then
|
||||||
|
echo '::set-output name=found::true'
|
||||||
echo "$file has a minor release tag"
|
echo "$file has a minor release tag"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
- name: Send PR review
|
- name: Send PR review
|
||||||
|
if: steps.find-blockers.outputs.found == 'true'
|
||||||
run: | # approve the pull request
|
run: | # approve the pull request
|
||||||
curl --request POST \
|
curl --request POST \
|
||||||
--url https://api.github.com/repos/${{github.repository}}/pulls/${{github.event.number}}/reviews \
|
--url https://api.github.com/repos/${{github.repository}}/pulls/${{github.event.number}}/reviews \
|
||||||
|
|
Loading…
Add table
Reference in a new issue