From e9b46b19673a8cffcdfd91542e990e027b0ddc9e Mon Sep 17 00:00:00 2001 From: Issy Long Date: Sat, 22 Aug 2020 16:28:49 +0100 Subject: [PATCH] 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. --- .github/workflows/tapioca.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/tapioca.yml b/.github/workflows/tapioca.yml index 6583afbab4..19be70f84f 100644 --- a/.github/workflows/tapioca.yml +++ b/.github/workflows/tapioca.yml @@ -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