Skip to content
Snippets Groups Projects
Unverified Commit 7d7b8077 authored by Dawid Dziurla's avatar Dawid Dziurla
Browse files

pr-publish: use workflow_dispatch trigger

parent 698ac63a
No related branches found
No related tags found
No related merge requests found
......@@ -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\.
.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment