Merge pull request #10527 from reitermarkus/fix-vendor-gems

Re-enable `vendor-gems` for pull requests.
This commit is contained in:
Mike McQuaid 2021-02-05 08:14:04 +00:00 committed by GitHub
commit 51e1b66976
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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