# Configuration File
The configuration file is YAML format, default path `adnv.yml`.
## Schema
```yaml
# Required: config version (semver requirement)
version: 1
# Workflow steps for `adnv run`
workflow:
- name: Step Name
actions:
- <action>: <config>
# ... more actions
# Sources and outputs for `adnv check`
check:
sources:
- label: Source Label
source: <source_url>
include: <regex> # optional
exclude: <regex> # optional
outputs:
<name>: !<Type>
# ... output config
```
## Workflow section
Each step has a `name` and a list of `actions`. Actions are executed sequentially, with each action's output piped to the next.
```yaml
workflow:
- name: My Step
actions:
- import:
source: !github owner/repo
directory: subdir # optional subdirectory
reference: main # optional branch/tag
- template:
engine: tera
glob: '**/*.tf'
variables:
key: value
- output:
path: ./result
```
See [Workflow Actions](./actions.md) for all action types.
## Check section
```yaml
check:
# Sources to monitor
sources:
- label: My Source # optional display label
source: git+https://github.com/org/repo
include: "^v?\\d+\\.\\d+\\.\\d+$" # optional regex filter
exclude: "alpha|beta|rc" # optional regex filter
outputs:
mattermost: !Mattermost
instance_url: https://mattermost.example.com
api_key: "api-key"
channel_id: "channel-id"
send_empty: false # optional, default false
message_template: | # optional, Tera template
{{ count }} new versions
element: !Element
homeserver_url: https://matrix.example.com
user_id: "@bot:example.com"
password: "password"
room_id: "!room:example.com"
mail: !Mail
smtp_server: smtp.example.com
sender: "bot@example.com"
sender_password: "password"
recipients:
- team@example.com
subject: "Update Report"
tls: true # optional, defaults to true
```
## Config file resolution
1. CLI: `adnv -c /path/to/config.yml`
2. Environment: `ADNV_CONFIG_FILE=/path/to/config.yml`
3. Default: `./adnv.yml`
If the path points to a directory, adnv looks for `adnv.yml` inside it.