Replies: 5 comments 10 replies
-
|
Please do yourself a favor and don't use it as a source of knowledge, it isn't. The source of knowledge for workflows is the github docs for workflows. As a favor, please allow me to provide a link to the actual documentation (you could use a normal search engine to find this, and I'd encourage you to practice learning how to do this): The short answer is that you cannot ask github to do what you want declaratively at the input stage. You can use an Implementing any of this is left as an exercise for a human. Again, please don't ask ChatGPT to do your homework for you. |
Beta Was this translation helpful? Give feedback.
-
|
EDIT: PLEASE CONSIDER USING @aarcro solution to avoid remote shell script injection. Look at the thread for explanation of the potential risks to my original solution. I'm sorry that you didn't get your question answered... it seems pretty legit question, irregardless with how you are trying to find the answer.... Here's what I've tried doing: Any exit code in a script that is not exit 0 will terminate github action step and subsequently everything after this. Here's how I am validating my inputs. |
Beta Was this translation helpful? Give feedback.
-
|
There's no official recommendation for input validation yet, but common approaches include: Conditional Statements: Use if statements to check input values against expected formats or ranges. Write a script (e.g., bash, Python) to perform detailed validation logic. Here's how to create a more user-friendly and robust validation approach: Leverage Input Types: Define input types (string, boolean, choice) in your workflow YAML. For complex validation, use the provided input value within your workflow steps. Set default values for optional inputs to provide a smoother user experience. `name: My Workflow on: jobs: Rest of your workflow steps using validated inputs` |
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.
-
|
I am missing this feature too. Of course we validate input on the code itself but by the time we do, it might be too late (clone already happen, install of devs too and very likely build of a tool did) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Question
Body
Please share with me and with the community how you handle input validation for manually triggered workflows so that we might (in lieu of any officially recommended solution) learn of a more elegant solution than what we currently employ in our own workflows. Thank you.
Beta Was this translation helpful? Give feedback.
All reactions