diff --git a/Library/Homebrew/dev-cmd/pr-publish.rb b/Library/Homebrew/dev-cmd/pr-publish.rb index 54b4a28c2e..68177b0c13 100644 --- a/Library/Homebrew/dev-cmd/pr-publish.rb +++ b/Library/Homebrew/dev-cmd/pr-publish.rb @@ -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 diff --git a/docs/Manpage.md b/docs/Manpage.md index c9df04b5fd..4309e973d0 100644 --- a/docs/Manpage.md +++ b/docs/Manpage.md @@ -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`* ...] diff --git a/manpages/brew.1 b/manpages/brew.1 index 6f0ad711f6..d1777b9401 100644 --- a/manpages/brew.1 +++ b/manpages/brew.1 @@ -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\. .