Re-enable vendor-gems for pull requests.

This commit is contained in:
Markus Reiter 2021-02-05 03:09:48 +01:00
parent 42b755e13f
commit e9a5ef8916

View File

@ -1,6 +1,7 @@
name: Vendor Gems name: Vendor Gems
on: on:
pull_request_target:
workflow_dispatch: workflow_dispatch:
inputs: inputs:
pull_request: pull_request:
@ -40,17 +41,25 @@ jobs:
env: env:
GITHUB_TOKEN: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }} GITHUB_TOKEN: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
- name: Vendor Gems - name: Vendor Gems
env:
GEM_NAME: ${{ steps.checkout.outputs.gem_name }}
run: | run: |
if [[ '${{ steps.checkout.outputs.gem_name }}' == 'sorbet' ]]; then set -u
if [[ "${GEM_NAME}" == 'sorbet' ]]; then
brew vendor-gems --update sorbet,sorbet-runtime brew vendor-gems --update sorbet,sorbet-runtime
else else
brew vendor-gems brew vendor-gems
fi fi
- name: Update RBI files - name: Update RBI files
env:
GEM_NAME: ${{ steps.checkout.outputs.gem_name }}
run: | run: |
set -u
if brew typecheck --update --fail-if-not-changed; then if brew typecheck --update --fail-if-not-changed; then
if git add Library/Homebrew/sorbet; then if git add Library/Homebrew/sorbet; then
git commit -m "Update RBI files for ${{ steps.checkout.outputs.gem_name }}." git commit -m "Update RBI files for ${GEM_NAME}."
fi fi
git reset --hard git reset --hard