Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
feat: preview label deployments #1413
feat: preview label deployments #1413
Changes from 1 commit
71b1d53
4272c57
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
is this necessary? does using the branch name not work?
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.
let me check, I think it's because the ref is different depending on the event but maybe we can use
event.ref
for both 🤔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.
actually yeah this is required, we can only get the ref name for the PR from the pull request event object. using something like
github.ref
will only return the PR number:https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#github-context
I did a test run here and you can see it doesn't include the ref name in the last value. instead, it shows up as
1428/merge
:https://github.com/chanzuckerberg/cryoet-data-portal/actions/runs/12481761093/job/34834780913?pr=1428
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.
is this the only thing you need to check? this whole condition only has to be a subset of the condition at the job level right?
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 think the main thing is we only want this to run when:
dev-*
we actually do check if
preview
exists before executing the job here:https://github.com/chanzuckerberg/cryoet-data-portal/pull/1413/files/71b1d537f6ebcb5b719ba03e31df4580116f8d82#diff-e7d952112309f847816123cb3297f8db4d225d21505ac9a474488114ce6bb83dR28
so maybe we can remove this since it's already checked. if the event is
synchronize
, then it should have thepreview
label since the above condition passed 🤣let me check and see if it works as expected without 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.
just checked, yeah this can be removed. thank you for catching 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.
Fancy!