Skip to content

Commit

Permalink
Chore/allow prefect file pass (#36)
Browse files Browse the repository at this point in the history
* Allow prefect file pass

* Update readme to prefect yaml path

* Update readme to prefect yaml path

* Typo
  • Loading branch information
jimid27 authored Jan 18, 2024
1 parent d0c6797 commit 60ede49
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Additionally, the `prefect deploy` command needs to load your flow in order to g
|-------|------------|----------|
| deployment-names | Comma separated list of deployment names defined in the prefect.yaml file. | false |
| requirements-file-paths | Comma sepearated list of paths to requirements files to correctly install dependencies for your Prefect flow(s). | false |
| deployment-file-path | Relative path to your Prefect deployment file. Defaults to `./prefect.yaml` | false |
| all-deployments | If set to "true", all deployments defined in prefect.yaml will be deployed. This will override the deployment-names input. Defaults to "false" | true |

## Examples
Expand Down Expand Up @@ -67,6 +68,7 @@ jobs:
with:
deployment-names: Simple
requirements-file-paths: ./examples/simple/requirements.txt
prefect-file: ./examples/simple/prefect.yaml
```

### Multi-Deployment Prefect Deploy
Expand All @@ -89,6 +91,7 @@ jobs:
with:
deployment-names: Simple_Deployment_1,Simple_Deployment_2
requirements-file-paths: ./examples/multi-deployment/deployment-1/requirements.txt,./examples/multi-deployment/deployment-2/requirements.txt
prefect-file: ./multi-deployment/prefect.yaml
```

### Multi-Deployment Prefect Deploy of all Deployments defined in `prefect.yaml`
Expand All @@ -111,6 +114,7 @@ jobs:
with:
all-deployments: "true"
requirements-file-paths: ./examples/multi-deployment/deployment-1/requirements.txt,./examples/multi-deployment/deployment-2/requirements.txt
prefect-file: ./examples/multi-deployment/prefect.yaml
```

### Basic Docker Auth w/ Prefect Deploy
Expand Down Expand Up @@ -148,6 +152,7 @@ jobs:
with:
deployment-names: Docker
requirements-file-paths: ./examples/docker/requirements.txt
prefect-file: ./examples/docker/prefect.yaml
```
### GCP Workload Identity w/ Prefect Deploy

Expand Down Expand Up @@ -190,6 +195,7 @@ jobs:
with:
deployment-names: Docker
requirements-file-paths: ./examples/docker/requirements.txt
prefect-file: ./examples/docker/prefect.yaml
```

## Terms & Conditions
Expand Down
9 changes: 8 additions & 1 deletion action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ inputs:
required: false
default: ''

deployment-file-path:
description:
Relative path to your Prefect deployment file.
example './prefect-deployment-files/prefect.yaml'
required: false
default: './prefect.yaml'

pyproject-toml-path:
description:
Path to your pyproject.toml file for
Expand Down Expand Up @@ -72,7 +79,7 @@ runs:
else
IFS=',' read -ra deployment_names <<< "${{ inputs.deployment-names }}"
for name in "${deployment_names[@]}"; do
prefect --no-prompt deploy --name "$name"
prefect --no-prompt deploy --prefect-file "${{ inputs.deployment-file-path }}" --name "$name"
done
fi
shell: bash

0 comments on commit 60ede49

Please sign in to comment.