workflows/sorbet: fix pull request testing
This commit is contained in:
parent
44cb434d8b
commit
c776379fb6
23
.github/workflows/sorbet.yml
vendored
23
.github/workflows/sorbet.yml
vendored
@ -47,17 +47,20 @@ jobs:
|
|||||||
id: update
|
id: update
|
||||||
working-directory: ${{ steps.set-up-homebrew.outputs.repository-path }}
|
working-directory: ${{ steps.set-up-homebrew.outputs.repository-path }}
|
||||||
run: |
|
run: |
|
||||||
git fetch origin
|
if [[ "${GITHUB_EVENT_NAME}" != "pull_request" ]]
|
||||||
|
|
||||||
BRANCH="sorbet-files-update"
|
|
||||||
echo "branch=${BRANCH}" >> "$GITHUB_OUTPUT"
|
|
||||||
|
|
||||||
if git ls-remote --exit-code --heads origin "${BRANCH}"
|
|
||||||
then
|
then
|
||||||
git checkout "${BRANCH}"
|
git fetch origin
|
||||||
git checkout "Library/Homebrew/sorbet"
|
|
||||||
else
|
BRANCH="sorbet-files-update"
|
||||||
git checkout --no-track -B "${BRANCH}" origin/master
|
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
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
brew typecheck --update --suggest-typed
|
brew typecheck --update --suggest-typed
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user