-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathbuild_config.py
More file actions
37 lines (29 loc) · 1.07 KB
/
Copy pathbuild_config.py
File metadata and controls
37 lines (29 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
from __future__ import annotations
from pydantic import Field
from agentex.config._base import ConfigBaseModel
class BuildContext(ConfigBaseModel):
"""
Represents the context in which the Docker image should be built.
"""
root: str = Field(
...,
description="The root directory of the build context. Should be specified relative to the location of the "
"build config file.",
)
include_paths: list[str] = Field(
default_factory=list,
description="The paths to include in the build context. Should be specified relative to the root directory.",
)
dockerfile: str = Field(
...,
description="The path to the Dockerfile. Should be specified relative to the root directory.",
)
dockerignore: str | None = Field(
None,
description="The path to the .dockerignore file. Should be specified relative to the root directory.",
)
class BuildConfig(ConfigBaseModel):
"""
Represents a configuration for building the action as a Docker image.
"""
context: BuildContext