workflows/tapioca: Don't reset tapioca-update branch to origin/master

- In all of the PRs that this Action triggered, the `tapioca-update`
  branch was >200 commits behind the latest `master`.
- As per https://github.com/Homebrew/brew/pull/8435#issuecomment-678546024,
  we shouldn't rely on the `Homebrew/actions/setup-homebrew` master
  (the `origin/master` ref) branch being up to date, so resetting to
  `origin/master` was a bad idea.
- A side effect of this is that when we raise PRs to change the Action,
  the PRs that it generates will include local commits. But functionally
  all we care about is the Action that runs on a schedule.
This commit is contained in:
Issy Long 2020-08-22 16:28:49 +01:00
parent dc56b53392
commit e9b46b1967
No known key found for this signature in database
GPG Key ID: 8247C390DADC67D4

View File

@ -40,10 +40,9 @@ jobs:
bundle exec srb rbi hidden-definitions
git checkout -B tapioca-update
git reset origin/master
git add sorbet
if ! git diff --no-patch --exit-code HEAD -- sorbet; then
if ! git ls-remote --exit-code --heads origin tapioca-update; then
if ! git ls-remote --exit-code --heads origin tapioca-update >/dev/null; then
git commit -m "sorbet: update RBI files using Tapioca." -m "Autogenerated by [a scheduled GitHub Action](https://github.com/Homebrew/brew/blob/master/.github/workflows/tapioca.yml)."
echo "::set-output name=committed::true"
fi