# Your First Workflow
This tutorial teaches you to create an `adnv.yml` configuration that fetches a GitHub repository, applies templates, and outputs the result.
## What you'll build
A workflow that:
1. Imports a Helm chart from GitHub
2. Templates Terraform files with project-specific variables
3. Outputs the result to a local directory
## Step 1: Create the config file
Create `adnv.yml` in your project root:
```yaml
version: 1
workflow:
- name: Fetch Helm Chart
actions:
- import:
source: !github hubblo-org/scaphandre
directory: helm/scaphandre
- output:
path: helm_chart
```
## Step 2: Run the workflow
```shell
adnv run
```
adnv fetches the repository, extracts the `helm/scaphandre` subdirectory, and copies it to `./helm_chart`.
## Step 3: Add templating
Extend the workflow with a template step:
```yaml
version: 1
workflow:
- name: Fetch & template Terraform module
actions:
- import:
source: !gitlab my-org/templates/terraform-tool
- template:
engine: tera
glob: '**/*.tf'
variables:
name: MyProject
slug: my-project
project_id: $CI_PROJECT_ID
- output:
path: terraform_module
```
The `template` action processes all `.tf` files through the Tera engine, replacing `{{ name }}`, `{{ slug }}`, and `{{ project_id }}` with the provided values. Variables prefixed with `$` are expanded from environment variables.
## Step 4: Chain multiple steps
```yaml
version: 1
workflow:
- name: Fetch Helm Chart
actions:
- import:
source: !github hubblo-org/scaphandre
directory: helm/scaphandre
- output:
path: helm_chart
- name: Fetch & template Terraform
actions:
- import:
source: !gitlab my-org/templates/terraform-tool
- template:
engine: tera
glob: '**/*.tf'
variables:
name: MyProject
slug: my-project
- output:
path: terraform_module
- name: Copy local files
actions:
- local:
path: ./overrides
- copy:
dest: config
- output:
path: output
```
## How it works
```mermaid
graph TD
A[import] -->|fetches to temp dir| B[template]
B -->|processes files in-place| C[output]
C -->|copies to final path| D[./terraform_module]
E[local] -->|reads from disk| F[copy]
F -->|copies within pipe| G[output]
G -->|copies to final path| H[./output]
```
Each action reads from the previous action's output (the **pipe**). The pipe is a temporary directory that flows through the action chain.
## What's next?
- [Workflow Actions Reference](../reference/actions.md) - All available actions
- [Template Variables Reference](../reference/templates.md) - Tera template syntax
- [Run in CI/CD](../how-to/ci-cd.md) - Automate workflows in pipelines