How can I provide a link to a workflow which supports workflow_dispatch with a branch pre-selected? #58253
Replies: 2 comments 4 replies
-
To create a status badge that allows for initiating the deployment directly by clicking the badge, you would need to customize the badge URL and link it to a specific action. Unfortunately, GitHub badges themselves don't have built-in functionality to trigger deployments or directly run workflows. However, you can achieve a similar outcome by creating a custom badge that links to a specific page where users can initiate the deployment. This is how ever the approach my team uses although we got the idea from GPT
By customizing the badge's URL and creating a dedicated deployment page, you can provide a convenient way for users to initiate the deployment with their branch or PR pre-populated. Note that implementing this functionality would require custom coding and integration within your application or repository. |
Beta Was this translation helpful? Give feedback.
-
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Question
Body
When someone creates a PR I would like to create a status badge to the Deploy workflow for the repository. Right now I can display the status of the deploy workflow for the branch of the PR in the badge but I cannot seem to figure out how to initiate the deployment by simply clicking the badge.
At the very least I'd like to land them on a page which allows them to press the
Run workflow
button with their branch pre-populated.My team has dozens of branches (near 100 sometimes) and a lot of them have similar names and trying to pick the right branch every single time you deploy is kind of frustrating. It would be very nice to have a way to do a deployment from a Branch or PR rather than go to the workflow then pick the branch.
Beta Was this translation helpful? Give feedback.
All reactions