Homebrew / actions

🚀 Homebrew's GitHub Actions
BSD 2-Clause "Simplified" License
118 stars 39 forks source link

bump-packages: use `--no-fork` switch on our taps #495

Closed p-linnane closed 7 months ago

p-linnane commented 7 months ago

This PR switches the behavior of the bump-packages Action to use the new --no-fork switch added in https://github.com/Homebrew/brew/pull/16740. As I called out in that PR:

We can use this for BrewTestBot's autobump PR's. This will reduce the thousands of stale branches in the BrewTestBot forks (which I still plan to deal with).

Since the repo's branches get deleted after merging, this will save us the headache of cleaning up BrewTestBot's forks and allow us to see the branches more easily so they can be prioritized.

Bo98 commented 7 months ago

This will only work when run in Homebrew repositories, but this action is also used in third-party repositories to send PRs to us.

p-linnane commented 7 months ago

I can try to add a conditional to check for it being one of our taps? And fall back to the current behavior?

Bo98 commented 7 months ago

Yeah, a $GITHUB_REPOSITORY_OWNER == Homebrew check might work

p-linnane commented 7 months ago

We use if: github.repository_owner == 'Homebrew' in several other workflows, so I used that.

p-linnane commented 7 months ago

Happy to try and figure out a better way of handling the syntax. It'd be nice if there was an else for Actions.

p-linnane commented 7 months ago

Now with 50% less copy + paste thanks to Bo & GitHub Copilot 😆

p-linnane commented 7 months ago

Unfortunately this isn't working: https://github.com/Homebrew/homebrew-cask/actions/runs/8040369308. Will debug now.