Execute flow workflows in your GitHub Actions.
- uses: flowexec/action@v1
with:
executable: 'build app'
Check out the flow CI workflow for examples of how this can be used.
executable
- flow executable ID (VERB NAME) to run (e.g., "validate", "build app", "test unit", "deploy staging")
Input | Description | Default |
---|---|---|
workspace |
Workspace to use (path or name) | . |
workspace-name |
Name for the workspace (auto-generated if not provided) | |
workspaces |
YAML/JSON map of workspaces (supports local paths and git repositories) | |
clone-token |
GitHub token for cloning private repositories | |
clone-depth |
Git clone depth for repository cloning | 1 |
checkout-path |
Base directory for cloning repositories | .flow-workspaces |
flow-version |
Version of flow CLI to install | latest |
secrets |
JSON object of secrets to set in flow vault | {} |
vault-key |
Vault encryption key (for existing vaults) | |
working-directory |
Directory to run flow from | . |
timeout |
Timeout for executable execution | 30m |
continue-on-error |
Continue workflow if flow executable fails | false |
upload |
Whether to upload flow logs as an artifact | false |
Output | Description |
---|---|
exit-code |
Exit code of the flow executable |
output |
Output from the flow executable |
execution-time |
Time taken to execute the flow executable |
vault-key |
Generated vault encryption key (if vault was created) |
name: Build and Test
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build application
uses: flowexec/action@v1
with:
executable: 'build app'
- name: Run tests
uses: flowexec/action@v1
with:
executable: 'test unit'
- name: Deploy to staging
uses: flowexec/action@v1
with:
executable: 'deploy staging'
workspaces: |
backend: ./backend
frontend: https://github.com/user/frontend-repo
shared: https://github.com/user/shared-lib
clone-token: ${{ secrets.GITHUB_TOKEN }}
- name: Deploy with secrets
uses: flowexec/action@v1
with:
executable: 'deploy production'
secrets: |
{
"DATABASE_URL": "${{ secrets.DATABASE_URL }}",
"API_KEY": "${{ secrets.API_KEY }}"
}
jobs:
setup:
outputs:
vault-key: ${{ steps.init.outputs.vault-key }}
steps:
- uses: flowexec/action@v1
id: init
with:
executable: 'validate'
secrets: |
{"shared-secret": "${{ secrets.SHARED_SECRET }}"}
deploy:
needs: setup
steps:
- uses: flowexec/action@v1
with:
executable: 'deploy production'
vault-key: ${{ needs.setup.outputs.vault-key }}
secrets: |
{"deploy-key": "${{ secrets.DEPLOY_KEY }}"}
- name: Complex deployment
uses: flowexec/action@v1
with:
executable: 'deploy staging'
workspaces: |
app: .
terraform:
repo: https://github.com/myorg/terraform
ref: v1.2.0
k8s:
repo: https://github.com/myorg/k8s-configs
ref: staging
clone-token: ${{ secrets.GITHUB_TOKEN }}
timeout: '20m'
secrets: |
{
"AWS_ACCESS_KEY": "${{ secrets.AWS_ACCESS_KEY }}",
"KUBECONFIG": "${{ secrets.KUBECONFIG }}"
}
- Valid flow workspaces and executables in your repository
- GitHub Actions runner (ubuntu-latest or macos-latest)