-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle case for branch rebase/force push #109
Conversation
echo "event that triggered the workflow: $GITHUB_REF" | ||
branch=$(echo "${GITHUB_REF#refs/heads/}") | ||
git fetch origin $branch | ||
if ! git cat-file -e "${{ github.event.before }}" 2>/dev/null; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in case of force push, we would get a commit hash, which won't exist in the git history due to force push
DAGS_ONLY_DEPLOY=false | ||
SKIP_IMAGE_OR_DAGS_DEPLOY=false | ||
files=() | ||
echo "Manual workflow dispatch or a new branch or tag creation, hence missing github event before and/or after commit hash" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we remove references to manual workflow dispatch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
manual workflow dispatch will also have the GitHub event before and after as empty/null right? Or am I missing anything?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought we were removing manual workflow dispatch as a way of invoking this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope, only fixing the case for rebase/force push, while ensuring manual workflow dispatch works as it is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merging this PR, but let me know if we still need to adjust the log statement, happy to handle it.
Changes:
Testing:
Relates to #95