From 8f329340b897d493a399796f1f1e8792f5dc97dc Mon Sep 17 00:00:00 2001 From: root Date: Sun, 19 May 2024 06:16:08 +0000 Subject: [PATCH] add branch support --- .github/workflows/main.yml | 4 ++-- hello.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b8f91c4..1c50068 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,10 +27,10 @@ jobs: --perimeter default \ --github-actions - - name: Run helloworld flow + - name: Run tests run: |- python hello.py run --with kubernetes - name: Deploy to production run: |- - python hello.py argo-workflows create + python hello.py --branch ${{ github.head_ref || github.ref_name }} argo-workflows create diff --git a/hello.py b/hello.py index 1fc1947..f12dce6 100644 --- a/hello.py +++ b/hello.py @@ -1,5 +1,6 @@ -from metaflow import FlowSpec, step, card, schedule +from metaflow import FlowSpec, step, card, project +@project(name='mlproject') class GitHubActionsDemo(FlowSpec): @step