Skip to content

Commit

Permalink
Merge pull request #196105 from Homebrew/no-bottles
Browse files Browse the repository at this point in the history
publish-commit-bottles: publish bottles only for formulae changes
  • Loading branch information
ZhongRuoyu authored Oct 30, 2024
2 parents 38f2364 + 0dbfe35 commit 04d7388
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/publish-commit-bottles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,20 @@ jobs:
fi
done < <(jq --raw-output '.labels[].name' <<< "$pr_data")
if [[ "$bottles" = "true" ]]
then
if jq --exit-status 'any(.[].filename; startswith("Formula/")) | not'
then
echo '::notice ::PR does not modify formulae; no bottles to publish.'
bottles=false
fi < <(
gh api \
--header 'Accept: application/vnd.github+json' \
--header 'X-GitHub-Api-Version: 2022-11-28' \
"repos/$GH_REPO/pulls/$PR/files"
)
fi
requires_merge=true
if [[ "$merged" = "true" || "$automerge_enabled" = "true" ]]
then
Expand Down

0 comments on commit 04d7388

Please sign in to comment.