From e798d4dc173bfd7f1d31e2aecf406b3cf65857e3 Mon Sep 17 00:00:00 2001 From: Saketh Somaraju Date: Thu, 28 Nov 2024 22:29:25 +0530 Subject: [PATCH] Handle case when triggered event is a manual workflow_dispatch --- action.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/action.yaml b/action.yaml index d729914..22288be 100644 --- a/action.yaml +++ b/action.yaml @@ -315,6 +315,14 @@ runs: DBT_DEPLOY=false + # case when the triggered event is a manual workflow dispatch, we would need to deploy the dbt project because we cannot determine that it does not need to be deployed + GITHUB_EVENT_BEFORE=${{ github.event.before }} + GITHUB_EVENT_AFTER=${{ github.event.after }} + if [[ -z $GITHUB_EVENT_BEFORE && -z $GITHUB_EVENT_AFTER ]]; then + DBT_DEPLOY=true + files=() + fi + # case when the triggered event is a new branch or tag creation, we would need to deploy the dbt project because we cannot determine that it does not need to be deployed if [[ "${{ github.event.before }}" == "0000000000000000000000000000000000000000" ]] then @@ -368,6 +376,15 @@ runs: DAGS_ONLY_DEPLOY=false SKIP_IMAGE_OR_DAGS_DEPLOY=true + # case when the triggered event is a manual workflow dispatch, we would need to deploy the image because we cannot determine that it does not need to be deployed + GITHUB_EVENT_BEFORE=${{ github.event.before }} + GITHUB_EVENT_AFTER=${{ github.event.after }} + if [[ -z $GITHUB_EVENT_BEFORE && -z $GITHUB_EVENT_AFTER ]]; then + DAGS_ONLY_DEPLOY=false + SKIP_IMAGE_OR_DAGS_DEPLOY=false + files=() + fi + # case when the triggered event is a new branch or tag creation, we would need to deploy the image because we cannot determine that it does not need to be deployed if [[ "${{ github.event.before }}" == "0000000000000000000000000000000000000000" ]] then