From b2f0fa3f23f2dd36d81a66eedd7acc3bd5716d03 Mon Sep 17 00:00:00 2001 From: smohiudd Date: Thu, 21 Mar 2024 11:04:29 -0600 Subject: [PATCH 1/2] include model type --- workflows_api/runtime/src/main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/workflows_api/runtime/src/main.py b/workflows_api/runtime/src/main.py index fa6466ac..5b04a49a 100644 --- a/workflows_api/runtime/src/main.py +++ b/workflows_api/runtime/src/main.py @@ -86,7 +86,7 @@ async def publish_dataset( workflow_runs = [] for discovery in dataset.discovery_items: discovery.collection = dataset.collection - response = await start_discovery_workflow_execution(discovery.dict()) + response = await start_discovery_workflow_execution(discovery) workflow_runs.append(response.id) if workflow_runs: return_dict["message"] += f" {len(workflow_runs)} workflows initiated." # type: ignore @@ -103,12 +103,12 @@ async def publish_dataset( dependencies=[Depends(auth.get_username)], ) async def start_discovery_workflow_execution( - input=Body(..., discriminator="discovery"), + input: Union[schemas.S3Input, schemas.CmrInput]=Body(..., discriminator="discovery"), ) -> schemas.WorkflowExecutionResponse: """ Triggers the ingestion workflow """ - return airflow_helpers.trigger_discover(input) + return airflow_helpers.trigger_discover(input.dict()) @workflows_app.get( From 9ae98a84d274559ea9631258019532a15bb91ccd Mon Sep 17 00:00:00 2001 From: smohiudd Date: Thu, 21 Mar 2024 11:09:48 -0600 Subject: [PATCH 2/2] include tag in workflows --- .github/workflows/tags.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/tags.yml diff --git a/.github/workflows/tags.yml b/.github/workflows/tags.yml new file mode 100644 index 00000000..c9aaaf7a --- /dev/null +++ b/.github/workflows/tags.yml @@ -0,0 +1,24 @@ +name: tag + +on: + push: + branches: + - dev + +jobs: + tag: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Bump version and push tag + id: tag_version + uses: mathieudutour/github-tag-action@v6.2 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + - name: Create a GitHub release + uses: ncipollo/release-action@v1 + with: + tag: ${{ steps.tag_version.outputs.new_tag }} + name: Release ${{ steps.tag_version.outputs.new_tag }} + body: ${{ steps.tag_version.outputs.changelog }} \ No newline at end of file