diff --git a/.github/workflows/tapioca.yml b/.github/workflows/tapioca.yml index 9685d0b931..85c0f5cef5 100644 --- a/.github/workflows/tapioca.yml +++ b/.github/workflows/tapioca.yml @@ -35,14 +35,16 @@ jobs: run: | cd "$GITHUB_WORKSPACE/Library/Homebrew" + git fetch origin master + git reset --hard origin/master + git checkout -B tapioca-update + # TODO: replace with `brew typecheck` bundle exec tapioca sync --exclude json bundle exec srb rbi hidden-definitions - git fetch origin master - git reset --hard origin/master - git checkout -B tapioca-update git add sorbet + if ! git diff --no-patch --exit-code HEAD -- sorbet; 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)."