-
Notifications
You must be signed in to change notification settings - Fork 200
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
fix: docker image ee build if neccesary #2367
Conversation
|
WalkthroughThe GitHub Actions workflow enhancements bring advanced conditional logic for release naming and branch validation. A new job verifies branch existence, influencing subsequent tasks, while the release process dynamically adjusts suffixes based on deployment configurations. Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
PR Description updated to latest commit (41a2d70) |
PR Review 🔍
Code feedback:
|
PR Code Suggestions ✨
|
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.
Actionable comments posted: 2
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- .github/workflows/publish-workflows-service.yml (3 hunks)
Additional comments not posted (1)
.github/workflows/publish-workflows-service.yml (1)
269-287
: LGTM! Good implementation of branch existence check.
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.
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.
Actionable comments posted: 1
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- .github/workflows/publish-workflows-service.yml (3 hunks)
Additional comments not posted (2)
.github/workflows/publish-workflows-service.yml (2)
269-296
: LGTM! Thecheck_branch
job correctly checks branch existence and sets theskipnext
output variable.
299-301
: LGTM! Thebuild-and-push-ee-image
job correctly depends on thecheck_branch
job and uses its output to conditionally execute.
run: | | ||
if [ "${{ github.event.inputs.deploy_to_dev }}" == "true" ]; then | ||
suffix="-dev-${{ needs.build-and-push-image.outputs.sha_short }}" | ||
else | ||
suffix="" | ||
fi | ||
gh release create ${{ needs.build-and-push-image.outputs.version }}${suffix} --notes-start-tag ${{ needs.build-and-push-image.outputs.bumped_tag }} | ||
|
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.
Security risk: Avoid direct interpolation of GitHub context data in scripts.
- run: |
- if [ "${{ github.event.inputs.deploy_to_dev }}" == "true" ]; then
- suffix="-dev-${{ needs.build-and-push-image.outputs.sha_short }}"
- else
- suffix=""
- fi
- gh release create ${{ needs.build-and-push-image.outputs.version }}${suffix} --notes-start-tag ${{ needs.build-and-push-image.outputs.bumped_tag }}
+ env:
+ DEPLOY_TO_DEV: ${{ github.event.inputs.deploy_to_dev }}
+ SHA_SHORT: ${{ needs.build-and-push-image.outputs.sha_short }}
+ VERSION: ${{ needs.build-and-push_image.outputs.version }}
+ BUMPED_TAG: ${{ needs.build-and-push_image.outputs.bumped_tag }}
+ run: |
+ if [ "$DEPLOY_TO_DEV" == "true" ]; then
+ suffix="-dev-$SHA_SHORT"
+ else
+ suffix=""
+ fi
+ gh release create "${VERSION}${suffix}" --notes-start-tag "$BUMPED_TAG"
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
run: | | |
if [ "${{ github.event.inputs.deploy_to_dev }}" == "true" ]; then | |
suffix="-dev-${{ needs.build-and-push-image.outputs.sha_short }}" | |
else | |
suffix="" | |
fi | |
gh release create ${{ needs.build-and-push-image.outputs.version }}${suffix} --notes-start-tag ${{ needs.build-and-push-image.outputs.bumped_tag }} | |
env: | |
DEPLOY_TO_DEV: ${{ github.event.inputs.deploy_to_dev }} | |
SHA_SHORT: ${{ needs.build-and-push-image.outputs.sha_short }} | |
VERSION: ${{ needs.build-and-push_image.outputs.version }} | |
BUMPED_TAG: ${{ needs.build-and-push_image.outputs.bumped_tag }} | |
run: | | |
if [ "$DEPLOY_TO_DEV" == "true" ]; then | |
suffix="-dev-$SHA_SHORT" | |
else | |
suffix="" | |
fi | |
gh release create "${VERSION}${suffix}" --notes-start-tag "$BUMPED_TAG" |
User description
Description
Elaborate on the subject, motivation, and context.
Related issues
Breaking changes
How these changes were tested
Examples and references
Checklist
PR Type
enhancement, bug_fix
Description
Changes walkthrough 📝
publish-workflows-service.yml
Enhance GitHub Actions Workflow for Conditional Builds and Releases
.github/workflows/publish-workflows-service.yml
deploying to dev.
before proceeding with the build.
only proceed if the branch exists.
based on branch existence.
Summary by CodeRabbit
New Features
Refactor