diff --git a/.github/workflows/vendor-gems.yml b/.github/workflows/vendor-gems.yml index 12aa4372b25457..22d45dcaee563b 100644 --- a/.github/workflows/vendor-gems.yml +++ b/.github/workflows/vendor-gems.yml @@ -151,11 +151,18 @@ jobs: -m "Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gems.yml) workflow." fi + - uses: actions/create-github-app-token@v1 + id: app-token + if: github.event_name == 'pull_request_target' || github.event_name == 'workflow_dispatch' + with: + app-id: ${{ vars.BREW_COMMIT_APP_ID }} + private-key: ${{ secrets.BREW_COMMIT_APP_KEY }} + - name: Push to pull request if: github.event_name == 'pull_request_target' || github.event_name == 'workflow_dispatch' uses: Homebrew/actions/git-try-push@master with: - token: ${{ secrets.HOMEBREW_GITHUB_PUBLIC_REPO_TOKEN }} + token: ${{ steps.app-token.outputs.token }} directory: ${{ steps.set-up-homebrew.outputs.repository-path }} branch: ${{ steps.checkout.outputs.branch }} force: true