File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 1818 required : true
1919
2020permissions :
21- contents : read
21+ contents : write
2222 pull-requests : read
2323
2424defaults :
5252
5353 - name : Check out pull request
5454 id : checkout
55- if : github.event_name == 'workflow_dispatch'
55+ if : github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && github.event.pull_request.user.login == 'dependabot')
5656 run : |
5757 gh pr checkout "${PR}"
5858
6868
6969 - name : Vendor Gems
7070 run : |
71- if [[ "${GITHUB_EVENT_NAME}" == "workflow_dispatch" ]]
71+ if [[ "${GITHUB_EVENT_NAME}" == "workflow_dispatch" || ("${GITHUB_EVENT_NAME}" == "pull_request" && "${GITHUB_ACTOR}" == "dependabot") ]]
7272 then
7373 brew vendor-gems --non-bundler-gems
7474 else
7979 run : brew typecheck --update
8080
8181 - name : Commit RBI changes
82- if : github.event_name == 'workflow_dispatch'
82+ if : github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && github.event.pull_request.user.login == 'dependabot')
8383 env :
8484 GEM_NAME : ${{ steps.checkout.outputs.gem_name }}
8585 working-directory : ${{ steps.set-up-homebrew.outputs.repository-path }}
@@ -100,10 +100,10 @@ jobs:
100100 private-key : ${{ secrets.BREW_COMMIT_APP_KEY }}
101101
102102 - name : Push to pull request
103- if : github.event_name == 'workflow_dispatch'
103+ if : github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && github.event.pull_request.user.login == 'dependabot')
104104 uses : Homebrew/actions/git-try-push@main
105105 with :
106- token : ${{ steps.app-token.outputs.token }}
106+ token : ${{ steps.app-token.outputs.token || secrets.GITHUB_TOKEN }}
107107 directory : ${{ steps.set-up-homebrew.outputs.repository-path }}
108108 branch : ${{ steps.checkout.outputs.branch }}
109109 force : true
You can’t perform that action at this time.
0 commit comments