Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

A GitHub Action for authenticating into Prefect Cloud

Notifications You must be signed in to change notification settings

PrefectHQ/actions-prefect-auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deprecation Notice

  • This GitHub action is deprecated and should no longer be used for authenticating against Prefect Cloud. To authenticate against Prefect Cloud in your workflows, simply set two environment variables (PREFECT_API_KEY & PREFECT_API_URL) as described in the docs.

actions-prefect-auth

Details

A GitHub Action for authenticating into Prefect Cloud

Requirements

Inputs

Input Desription Required Default
prefect-api-key API Key to authenticate with Prefect. true
prefect-workspace Full handle of workspace, in format <account_handle>/<workspace_handle>. true

Examples

Basic Login

Log into Prefect Cloud using stored GHA Secrets

name: Log Into Prefect Cloud
on:
  push:
    branches:
      - main
jobs:
  deploy_flow:
    runs-on: ubuntu-latest
    steps:
      - uses: checkout@v3

      - uses: actions/setup-python@v4
        with:
          python-version: '3.10'
      
      - name: Prefect Auth
        uses: PrefectHQ/actions-prefect-auth@v2
        with:
          prefect-api-key: ${{ secrets.PREFECT_API_KEY }}
          prefect-workspace: ${{ secrets.PREFECT_WORKSPACE }}

Simple Prefect Deploy

Deploy a Prefect flow that doesn't have a push step defined in the prefect.yaml

name: Deploy a Prefect flow
on:
  push:
    branches:
      - main
jobs:
  deploy_flow:
    runs-on: ubuntu-latest
    steps:
      - uses: checkout@v3

      - uses: actions/setup-python@v4
        with:
          python-version: '3.10'

      - name: Prefect Auth
        uses: PrefectHQ/actions-prefect-auth@v2
        with:
          prefect-api-key: ${{ secrets.PREFECT_API_KEY }}
          prefect-workspace: ${{ secrets.PREFECT_WORKSPACE }}

      - name: Run Prefect Deploy
        uses: PrefectHQ/actions-prefect-deploy@v4
        with:
          requirements-file-path: ./examples/simple/requirements.txt
          entrypoint: ./examples/simple/flow.py:call_api
          additional-args: --cron '30 19 * * 0'

Terms & Conditions

See here for the Prefect's Terms and Conditions.

About

A GitHub Action for authenticating into Prefect Cloud

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •