diff --git a/action.yaml b/action.yaml index bd7ff5a..f739af6 100644 --- a/action.yaml +++ b/action.yaml @@ -371,14 +371,7 @@ runs: # case when the triggered event is a manual workflow dispatch or 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" || -z $GITHUB_EVENT_BEFORE && -z $GITHUB_EVENT_AFTER ]]; then echo "Manual workflow dispatch or a new branch or tag creation, hence missing github event before and/or after commit hash" - elif [[ "$GITHUB_REF" == refs/pull/*/merge ]]; then - pr_number="${GITHUB_REF#refs/pull/}" - pr_number="${pr_number%%/*}" - echo "Pull request triggered the workflow: $pr_number" - DAGS_ONLY_DEPLOY=false - SKIP_IMAGE_OR_DAGS_DEPLOY=false - files=() - elif [[ "$GITHUB_REF" == refs/heads/* ]]; then + else branch=$(echo "${GITHUB_REF#refs/heads/}") echo "Branch push triggered the workflow: $branch" git fetch origin $branch @@ -387,11 +380,8 @@ runs: else SKIP_IMAGE_OR_DAGS_DEPLOY=true files=$(git diff --name-only ${{ github.event.before }} ${{ github.event.after }}) + echo "files changed: $files" fi - echo "files changed: $files" - else - echo "Unknown event type: $GITHUB_REF, using image deploy" - fi for file in $files; do if [[ $file =~ ^"${{ inputs.root-folder }}".* ]]; then