How can I set the build context when using a conta...
# 🤖|ask-kapa
n
@microscopic-river-74022 How can I set the build context when using a container Build action and the source code is in a remote repository
m
Please stand by @narrow-optician-6866 as I search the knowledge base. I normally take about 15 seconds or so. :wave:
---------------------- To set the build context for a container Build action when the source code is in a remote repository, you can use the
source
configuration key in your Garden action configuration. Here's how you can do it: 1. Use the
source.repository
field to specify the remote repository URL. 2. Within the
source.repository
object, use the
url
field to provide the repository URL. Here's an example of how you can configure this:
Copy code
yaml
source:
  repository:
    url: "git+<https://github.com/org/repo.git#v2.0">
This configuration tells Garden to import the action source from the specified repository. The URL must contain a hash suffix pointing to a specific branch or tag, with the format: #. It's important to note that when you use this configuration, Garden will import the action source from this repository but will use the action configuration from your local Garden configuration file. For more detailed information on this topic, you can refer to the container Build configuration reference (). ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
message has been deleted
7 Views