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

Commit

Permalink
Update prefect auth action to use Prefect version 3 (#9)
Browse files Browse the repository at this point in the history
* 3.0-auth

* Cleanup

* Lint

* Equal to as well
  • Loading branch information
jimid27 authored Sep 4, 2024
1 parent 58d7a94 commit e093b96
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 29 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
python-version: '3.10'

- name: Prefect Auth
uses: PrefectHQ/actions-prefect-auth@v1
uses: PrefectHQ/actions-prefect-auth@v2
with:
prefect-api-key: ${{ secrets.PREFECT_API_KEY }}
prefect-workspace: ${{ secrets.PREFECT_WORKSPACE }}
Expand All @@ -63,13 +63,13 @@ jobs:
python-version: '3.10'
- name: Prefect Auth
uses: PrefectHQ/actions-prefect-auth@v1
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@v1
uses: PrefectHQ/actions-prefect-deploy@v4
with:
requirements-file-path: ./examples/simple/requirements.txt
entrypoint: ./examples/simple/flow.py:call_api
Expand Down
2 changes: 1 addition & 1 deletion action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ runs:
steps:
- id: install-prefect-locally
shell: bash
run: pip install -q "prefect<3"
run: pip install -q "prefect>=3,<4"

- id: prefect-cloud-login
run: |
Expand Down
13 changes: 0 additions & 13 deletions examples/simple/deployment.yaml

This file was deleted.

2 changes: 0 additions & 2 deletions examples/simple/flow.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import json

import requests
from prefect import flow

Expand Down
24 changes: 14 additions & 10 deletions examples/simple/prefect.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
# File for configuring project / deployment build, push and pull steps

# Generic metadata about this project
---
name: simple
prefect-version: 2.10.4
prefect-version: 3.0.0

# build section allows you to manage and build docker images
build: null

# push section allows you to manage if
# and how this project is uploaded to remote locations
push: null

# pull section allows you to provide instructions
# for cloning this project in remote locations
pull:
- prefect.projects.steps.git_clone_project:
- prefect.deployments.steps.git_clone:
repository: [email protected]:PrefectHQ/actions-prefect-deploy.git
branch: main
access_token: "{{ prefect.blocks.secret.simple-github-pat }}"

deployments:
- name: Simple
description: A simple example
entrypoint: flow.py:call_api
parameters: {}
schedule: {}
work_pool:
job_variables:
image: prefecthq/prefect:3-latest
name: simple-pool

0 comments on commit e093b96

Please sign in to comment.