Skip to content

Commit ed0c52b

Browse files
committed
setup builder and examples
0 parents  commit ed0c52b

35 files changed

+1829
-0
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @jahvon

.github/workflows/ci.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: CI
2+
on:
3+
push:
4+
branches: [main]
5+
pull_request:
6+
permissions:
7+
contents: read # for actions/checkout to fetch code
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
10+
cancel-in-progress: true
11+
jobs:
12+
validate:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- name: Set up Go
17+
uses: actions/setup-go@v5
18+
with:
19+
go-version: "^1.24"
20+
- name: Install yamlfmt
21+
run: go install github.com/google/yamlfmt/cmd/[email protected]
22+
- uses: flowexec/action@v1
23+
with:
24+
executable: 'validate'
25+
timeout: '5m'
26+
flow-version: 'main'

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
savedResponse.*

.yamlfmt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
formatter:
2+
type: basic
3+
max_line_length: 120

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<p align="center"><a href="https://flowexec.io"><img src="https://flowexec.io/_media/logo.png" alt="flow" width="200"/></a></p>
2+
3+
<br>
4+
5+
# flow file examples
6+
7+
This repository contains example flow files demonstrating various executable types and workflows.
8+
9+
### Generated Files
10+
11+
- **`*.flow.yaml`** - Flow file examples demonstrating different executable types
12+
- **`assets/`** - Supporting files (scripts, templates, data files) referenced by the examples
13+
14+
### Examples Include
15+
16+
- **Exec Examples** - Running shell commands and scripts
17+
- **Parallel Examples** - Executing multiple tasks concurrently
18+
- **Serial Examples** - Sequential task execution
19+
- **Request Examples** - HTTP requests and API interactions
20+
- **Render Examples** - Template rendering with data
21+
- **Launch Examples** - Launching processes
22+
- **Executable Template Example** - Define flowfile templates for reusable workflows patterns
23+
24+
## Generating Examples
25+
26+
The examples are generated using the builder tool in `cmd/builder/`. To regenerate all examples:
27+
28+
```bash
29+
go run cmd/builder/*.go
30+
# or run via flow with
31+
flow validate
32+
```

assets/env-script.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/sh
2+
3+
echo "Environment variables demonstration:"
4+
echo "NAME: $NAME"
5+
echo "HOME: $HOME"
6+
echo "USER: $USER"
7+
echo "PATH: $PATH"
8+
echo "PWD: $PWD"
9+
10+
# Some flow-specific environment variables
11+
echo "FLOW_WORKSPACE_PATH: $FLOW_WORKSPACE_PATH"
12+
echo "FLOW_NAMESPACE: $FLOW_NAMESPACE"

assets/generated.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/sh
2+
3+
# f:name=generated f:verb=run
4+
# f:description="start of the description"
5+
# But I'm not done yet!
6+
#
7+
# <f|description>
8+
# continued description
9+
# <f|description>
10+
11+
echo "This executable was generated from shell comments!"

assets/hello.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
3+
echo "Hello $NAME from hello.sh!"
4+
echo "This is a simple example script."

assets/message.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
This is a simple text file used in examples.
2+
3+
It contains multiple lines of text to demonstrate
4+
file handling and processing in flow executables.
5+
6+
End of message.

assets/simple-script.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
3+
echo "Hello, world!"
4+
echo "The current date and time is: $(date)"
5+
echo "You are in: $(pwd)"
6+
echo "The files in this directory are:"
7+
ls

0 commit comments

Comments
 (0)