diff --git a/README.md b/README.md index a825ebc..dfc40dd 100644 --- a/README.md +++ b/README.md @@ -31,8 +31,9 @@ Additionally, the `prefect deploy` command needs to load your flow in order to g | Input | Desription | Required | |-------|------------|----------| -| deployment-names | Comma separated list of deployment names defined in the prefect.yaml file. | true | +| 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 | +| 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 diff --git a/action.yaml b/action.yaml index c2ef6ca..69612f4 100644 --- a/action.yaml +++ b/action.yaml @@ -23,6 +23,12 @@ inputs: example './flow1/requirements.txt,./flow2/requirements.txt' required: false default: '' + all-deployments: + description: + If set to true, all deployments will be + deployed. This will override the + deployment-names input. + default: "false" runs: using: composite @@ -45,8 +51,13 @@ runs: echo "The currently installed Prefect version (2.$PREFECT_SHORT_VERSION) will be updated to the latest to ensure compatibility with this action." pip install prefect -U "prefect>=2.10.14" fi - IFS=',' read -ra deployment_names <<< "${{ inputs.deployment-names }}" - for name in "${deployment_names[@]}"; do - prefect --no-prompt deploy --name "$name" - done + if [ ${{ inputs.all-deployments }} == "true" ]; + then + prefect --no-prompt deploy --all + else + IFS=',' read -ra deployment_names <<< "${{ inputs.deployment-names }}" + for name in "${deployment_names[@]}"; do + prefect --no-prompt deploy --name "$name" + done + fi shell: bash