GitHub Action for running Prefect commands using the Prefect CLI.
It requires that the checkout
and setup-python
actions be used first.
api-key
(Required): A Prefect Cloud API keycommand
(Required): The prefect commandprefect-version
(Optional): Version of prefect to userequirements-files
(Optional): Path(s) to requirements files that should be installed to properly configure third-party imports
prefect-command
: Output of the prefect command
name: Register prefect flow
on:
- push
jobs:
register-using-flow-path:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Perform prefect login
uses: sp1thas/prefect-cli-action@main
with:
command: prefect auth login --key ${{ secrets.PREFECT_APIKEY }}
- name: Register prefect flow
uses: sp1thas/prefect-cli-action@main
with:
command: prefect register --project test -p flows/flow.py