Skip to content
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 when triggered event is a new branch or a tag push #90

Merged
merged 5 commits into from
Oct 29, 2024

Conversation

neel-astro
Copy link
Collaborator

@neel-astro neel-astro commented Oct 28, 2024

Description:

Fix the case when the before SHA for the triggered event is null (i.e. case when a new tag is pushed), in which case now we would do an image deploy and a dbt deploy (if configured), to be on the safe side.

Testing:

manually running the tests, since it is not straightforward to replicate the behavior in e2e tests. The below screenshot shows a run in a repo that had an "on tag" trigger event.
Screenshot 2024-10-28 at 2 32 18 PM
Reference: https://github.com/neel-astro/example-repo-update/actions/runs/11550491614/job/32145579388

Fixes: #82

@neel-astro neel-astro marked this pull request as ready for review October 28, 2024 09:04
@neel-astro neel-astro requested a review from a team as a code owner October 28, 2024 09:04
action.yaml Outdated
DBT_DEPLOY=false

# case when the triggered event is a new tag creation, then we would need to deploy the dbt project to be on the safe side
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: there is also a before null commit on pushing a new branch

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ohh yeah, good call to include that as well 👍

action.yaml Outdated
DBT_DEPLOY=false

# case when the triggered event is a new tag creation, then we would need to deploy the dbt project to be on the safe side
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: "on the safe side" is a bit vague. We should say that we have to deploy the dbt project (or image below) because we cannot determine that it does not need to be deployed

Copy link
Collaborator

@jeremybeard jeremybeard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving ahead of comment nits

@neel-astro neel-astro changed the title Handle case when triggered event is a tag push Handle case when triggered event is a new branch or a tag push Oct 28, 2024
@neel-astro neel-astro merged commit cf22781 into main Oct 29, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Action fails if run on a tag push event
2 participants