Skip to content

Commit

Permalink
workflows/sorbet: fix pull request testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Bo98 committed Dec 1, 2023
1 parent 44cb434 commit c776379
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions .github/workflows/sorbet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,20 @@ jobs:
id: update
working-directory: ${{ steps.set-up-homebrew.outputs.repository-path }}
run: |
git fetch origin
if [[ "${GITHUB_EVENT_NAME}" != "pull_request" ]]
then
git fetch origin
BRANCH="sorbet-files-update"
echo "branch=${BRANCH}" >> "$GITHUB_OUTPUT"
BRANCH="sorbet-files-update"
echo "branch=${BRANCH}" >> "$GITHUB_OUTPUT"
if git ls-remote --exit-code --heads origin "${BRANCH}"
then
git checkout "${BRANCH}"
git checkout "Library/Homebrew/sorbet"
else
git checkout --no-track -B "${BRANCH}" origin/master
if git ls-remote --exit-code --heads origin "${BRANCH}"
then
git checkout "${BRANCH}"
git checkout "Library/Homebrew/sorbet"
else
git checkout --no-track -B "${BRANCH}" origin/master
fi
fi
brew typecheck --update --suggest-typed
Expand Down

0 comments on commit c776379

Please sign in to comment.