Replies: 3 comments 3 replies
-
To handle the scenario where you need to deploy only one specific service based on the DEPLOY input, you can modify the workflow by dynamically selecting the matrix elements based on the input value. The idea is to include a conditional logic that picks only the relevant matrix element when inputs.DEPLOY is not equal to ALL. Here is how you can modify the deploy_one job to use the selected input directly to filter the matrix elements: yaml name: Conditional Matrix Workflow on: permissions: jobs: deploy_one: The condition if: ${{ github.event.inputs.DEPLOY != 'ALL' && github.event.inputs.DEPLOY == matrix.image }} ensures that only the matrix element that matches the selected input is used in the deploy_one job. |
Beta Was this translation helpful? Give feedback.
-
I found only such a solution, maybe someone can suggest a better one?
|
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
hello,
i need to use just one matrix element, based on inputs. How?
Beta Was this translation helpful? Give feedback.
All reactions