Barys Rutman
10/09/2023, 9:16 AMdiff develop...main
command will not show any changes.
Could anyone suggest the workaround how to deploy changed flows?
---
name: "Deploy modified Flows to Prefect Cloud"
on:
push:
branches:
- develop
- main
jobs:
set_description:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
changes:
name: Summary of flow changes
runs-on: ubuntu-latest
outputs:
prefect_flows: ${{ steps.filter.outputs.flows_files }}
prefect_flows_changed: ${{ steps.filter.outputs.flows }}
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
id: filter
with:
list-files: json
filters: |
flows:
- added|modified: 'flows/**/*.py'
- name: Generate Markdown Summary
run: |
echo Flows: ${{ steps.filter.outputs.flows_files }} >> $GITHUB_STEP_SUMMARY
deploy:
needs: changes
if: ${{ needs.changes.outputs.prefect_flows_changed == 'true' }}
runs-on: ubuntu-latest
strategy:
matrix:
flows: ${{ fromJson(needs.changes.outputs.prefect_flows) }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Python dependencies
run: |
sudo apt-get install -y freetds-dev libkrb5-dev libssl-dev libgssapi-krb5-2
pip install -U ./docker/default.runner/prefect-ef
pip install anyio==3.7.1
- name: Prefect Cloud Dev login
if: github.ref_name == 'develop'
run: |
prefect config set PREFECT_API_KEY=${{ secrets.PREFECT_API_KEY }}
prefect config set PREFECT_API_URL=${{ secrets.DEV_PREFECT_API_URL }}
- name: Prefect Cloud Prod login
if: github.ref_name == 'main'
run: |
prefect config set PREFECT_API_KEY=${{ secrets.PREFECT_API_KEY }}
prefect config set PREFECT_API_URL=${{ secrets.PROD_PREFECT_API_URL }}
- name: Deploy flows to Prefect Cloud
id: build
run: |
python ${{ matrix.flows }}
Barys Rutman
10/09/2023, 12:40 PM