mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
workflows/vendor-gems: trial using GitHub App token
This commit is contained in:
parent
d7a0f299b4
commit
41d60e54a1
6
.github/actionlint.yaml
vendored
6
.github/actionlint.yaml
vendored
@ -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
|
||||
|
10
.github/workflows/vendor-gems.yml
vendored
10
.github/workflows/vendor-gems.yml
vendored
@ -151,11 +151,19 @@ jobs:
|
||||
-m "Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gems.yml) workflow."
|
||||
fi
|
||||
|
||||
- name: Generate push token
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user