Skip to content

Latest commit

 

History

History
41 lines (32 loc) · 1.27 KB

README.md

File metadata and controls

41 lines (32 loc) · 1.27 KB

Prefect CLI Github Action

GitHub Action for running Prefect commands using the Prefect CLI.

It requires that the checkout and setup-python actions be used first.

Inputs

  • api-key (Required): A Prefect Cloud API key
  • command (Required): The prefect command
  • prefect-version (Optional): Version of prefect to use
  • requirements-files (Optional): Path(s) to requirements files that should be installed to properly configure third-party imports

Outputs

  • prefect-command: Output of the prefect command

Example usage

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