Skip to content

Commit

Permalink
Handle case when triggered event is a manual workflow_dispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
Saketh Somaraju authored and Saketh Somaraju committed Nov 28, 2024
1 parent e6e4fdf commit e798d4d
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e798d4d

Please sign in to comment.