diff --git a/README.md b/README.md index 536368d..3584fc9 100644 --- a/README.md +++ b/README.md @@ -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 }} @@ -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 diff --git a/action.yaml b/action.yaml index 393cf14..09cce64 100644 --- a/action.yaml +++ b/action.yaml @@ -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: | diff --git a/examples/simple/deployment.yaml b/examples/simple/deployment.yaml deleted file mode 100644 index 59e6158..0000000 --- a/examples/simple/deployment.yaml +++ /dev/null @@ -1,13 +0,0 @@ -description: null -entrypoint: examples/simple/flow.py:call_api -flow_name: null -name: Simple -parameters: {} -schedule: null -tags: [] -version: null -work_pool: - job_variables: - image: prefecthq/prefect:2-latest - name: simple-pool - work_queue_name: null diff --git a/examples/simple/flow.py b/examples/simple/flow.py index c140d36..0f6c559 100755 --- a/examples/simple/flow.py +++ b/examples/simple/flow.py @@ -1,5 +1,3 @@ -import json - import requests from prefect import flow diff --git a/examples/simple/prefect.yaml b/examples/simple/prefect.yaml index c4d4333..0fc023c 100644 --- a/examples/simple/prefect.yaml +++ b/examples/simple/prefect.yaml @@ -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: git@github.com: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