how do I conditionally trigger an action based on ...
# 🤖|ask-kapa
w
@microscopic-river-74022 how do I conditionally trigger an action based on file changes?
m
Please stand by @white-kite-45517 as I search the knowledge base. I normally take about 15 seconds or so. :wave:
---------------------- Based on the provided knowledge sources, Garden offers a feature called "workflows" that can be used to conditionally trigger actions based on file changes. Here's how you can set this up: 1. Define a workflow in your Garden configuration file. 2. Use the
triggers
field in the workflow configuration to specify when the workflow should run. Here's an example of how you can configure a workflow to trigger on pull requests from
feature/*
branches:
Copy code
yaml
kind: Workflow
name: my-workflow
steps:
  - ...
triggers:
  - environment: local
    events: [pull-request]
    branches: [feature/*]
This configuration will trigger the workflow when a pull request is made from any branch starting with
feature/
. For more detailed information on configuring triggers and workflows, you can refer to the [Workflows documentation](). It's important to note that this feature is available in Garden Cloud, which can monitor your project repository for updates and trigger workflows automatically on events like PR and branch updates. If you need more specific information about triggering actions based on individual file changes, the provided knowledge sources don't contain enough detailed information to answer that particular aspect of your question. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
message has been deleted