Skip to content

Commit

Permalink
workflows/vendor-gems: trial using GitHub App token
Browse files Browse the repository at this point in the history
  • Loading branch information
Bo98 committed Nov 22, 2023
1 parent d7a0f29 commit 4b32ef1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/actionlint.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
self-hosted-runner:
# Labels of self-hosted runner in array of strings.
labels:
- 11-arm64
labels: []
# Configuration variables in array of strings defined in your repository or
# organization. `null` means disabling configuration variables check.
# Empty array means no configuration variable is allowed.
config-variables: []
config-variables:
- BREW_COMMIT_APP_ID
9 changes: 8 additions & 1 deletion .github/workflows/vendor-gems.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 4b32ef1

Please sign in to comment.