mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
pr-publish: use workflow_dispatch trigger
This commit is contained in:
parent
698ac63a06
commit
7d7b80774e
@ -16,6 +16,8 @@ module Homebrew
|
||||
EOS
|
||||
flag "--tap=",
|
||||
description: "Target tap repository (default: `homebrew/core`)."
|
||||
flag "--workflow=",
|
||||
description: "Target workflow filename (default: `publish-commit-bottles.yml`)."
|
||||
switch :verbose
|
||||
min_named 1
|
||||
end
|
||||
@ -25,6 +27,8 @@ module Homebrew
|
||||
pr_publish_args.parse
|
||||
|
||||
tap = Tap.fetch(Homebrew.args.tap || CoreTap.instance.name)
|
||||
workflow = Homebrew.args.workflow || "publish-commit-bottles.yml"
|
||||
ref = "master"
|
||||
|
||||
args.named.uniq.each do |arg|
|
||||
arg = "#{tap.default_remote}/pull/#{arg}" if arg.to_i.positive?
|
||||
@ -36,7 +40,7 @@ module Homebrew
|
||||
end
|
||||
|
||||
ohai "Dispatching #{tap} pull request ##{issue}"
|
||||
GitHub.dispatch_event(user, repo, "Publish ##{issue}", pull_request: issue)
|
||||
GitHub.workflow_dispatch_event(user, repo, workflow, ref, pull_request: issue)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -901,6 +901,8 @@ the repository.
|
||||
|
||||
* `--tap`:
|
||||
Target tap repository (default: `homebrew/core`).
|
||||
* `--workflow`:
|
||||
Target workflow filename (default: `publish-commit-bottles.yml`).
|
||||
|
||||
### `pr-pull` [*`options`*] *`pull_request`* [*`pull_request`* ...]
|
||||
|
||||
|
@ -1175,6 +1175,10 @@ Publish bottles for a pull request with GitHub Actions\. Requires write access t
|
||||
\fB\-\-tap\fR
|
||||
Target tap repository (default: \fBhomebrew/core\fR)\.
|
||||
.
|
||||
.TP
|
||||
\fB\-\-workflow\fR
|
||||
Target workflow filename (default: \fBpublish\-commit\-bottles\.yml\fR)\.
|
||||
.
|
||||
.SS "\fBpr\-pull\fR [\fIoptions\fR] \fIpull_request\fR [\fIpull_request\fR \.\.\.]"
|
||||
Download and publish bottles, and apply the bottle commit from a pull request with artifacts generated by GitHub Actions\. Requires write access to the repository\.
|
||||
.
|
||||
|
Loading…
x
Reference in New Issue
Block a user