Skip to content

Github Action for running Prefect commands using the Prefect CLI

License

Notifications You must be signed in to change notification settings

sp1thas/prefect-cli-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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