-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (35 loc) · 1.09 KB
/
run_a_flow.yaml
File metadata and controls
38 lines (35 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Run flow
on:
workflow_dispatch:
inputs:
prefect-version:
description: Prefect version for flows
required: true
default: '2.*'
type: string
flow:
description: Flow to run
required: true
type: choice
options: ['healthcheck.py', 'hello_subflow.py', 'parametrized.py']
jobs:
run:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v3
with:
python-version: 3.9
- name: Python dependencies
run: |
pip install -U prefect==${{ github.event.inputs.prefect-version }}
- name: Prefect Cloud login
run: |
prefect config set PREFECT_API_KEY=${{secrets.PREFECT_API_KEY}}
prefect cloud workspace set --workspace "${{secrets.PREFECT_WORKSPACE}}"
- name: Run the flow
run: |
export PYTHONPATH="${PYTHONPATH}:/home/runner/work/prefect-getting-started/prefect-getting-started/"
python flows/${{ github.event.inputs.flow }}