Is there possible to use Git Tags as a choice of workflow dispatch's input #45871
-
Select Topic AreaProduct Feedback BodyUse CaseAssume that I have GitHub Action ExpectationI would be great if we have WorkaroundCurrently, I use name: Release
on:
workflow_dispatch:
inputs:
app:
description: "The app to release. The name should be the same as name in package.json"
required: true
version:
description: "The version to release. The version should be the same as version in package.json. For example, 1.0.0"
required: true
jobs:
release:
name: Deploy
steps:
- name: Checkout Repo
uses: actions/checkout@v2
with:
ref: ref/tags/${{ inputs.version }} |
Beta Was this translation helpful? Give feedback.
Replies: 10 comments 5 replies
-
Hi, I am working on a similar issue. What you are asking is kinda there today. When you run a workflow, the default parameter is show on right hand side as "Branch: Main", click on it, you will see all branches and a tab for Tags. Note I found that tags that were created before the github actions workflow were created are disabled. |
Beta Was this translation helpful? Give feedback.
-
Is this still open or please share the script if you find the solution. Basically, we need to list the branches/tags names as a drop-down/list to select to trigger the workflow. |
Beta Was this translation helpful? Give feedback.
-
@saenyakorn |
Beta Was this translation helpful? Give feedback.
-
It would be great to have this feature! |
Beta Was this translation helpful? Give feedback.
-
It would be really a nice feature to have!!! |
Beta Was this translation helpful? Give feedback.
-
yes, since we perform release actions against release tags, being able to select the tag instead of the branch would be ideal. +1 |
Beta Was this translation helpful? Give feedback.
-
Hey, I'm creating a new custom action to update the options automatically whenever a new tag is created.
Any feedback and ideas are welcome 🚀 |
Beta Was this translation helpful? Give feedback.
-
I am surprised this doesn't exist since its such a common use case to deploy based on a specific tag. Thinking out loud, GitHub can create a new custom input type called tag that works a bit like dynamic search field. Where if a user clicks on this field, it dynamically presents user last 5 or 10 tags to pick the tag from. And if the user wants to go earlier than that, then they could probably start typing and search for it. |
Beta Was this translation helpful? Give feedback.
-
![]() I don't know when but we can now use Tag as a source of workflow_dispatch. Thank you GitHub Team. So, I decided to close this discussion now. Thank you everyone. |
Beta Was this translation helpful? Give feedback.
I don't know when but we can now use Tag as a source of workflow_dispatch. Thank you GitHub Team. So, I decided to close this discussion now. Thank you everyone.