-
Notifications
You must be signed in to change notification settings - Fork 14
Deployment slot - Fallback to main when content branch does not exist #2436
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
Conversation
🚀 PR Preview Deployed
This preview will be automatically deleted when the PR is closed. |
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.
Pull request overview
This pull request implements a fallback mechanism for the Tina content branch in deployment workflows. When building a pull request preview, the system will now check if a corresponding branch exists in the SSW.Rules.Content repository before attempting to use it, falling back to "main" if the branch doesn't exist.
Changes:
- Added a new step to resolve the Tina content branch with fallback logic to "main" when the desired branch doesn't exist
- Updated all references from the direct input parameter to use the resolved branch value
- Added the resolved content branch to the PR preview comment for better visibility
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| .github/workflows/build-artifacts.yml | Added branch resolution step with git ls-remote check and fallback logic; updated all tina_branch references to use resolved_tina_branch output; added new workflow output for the resolved branch |
| .github/workflows/pr-open.yml | Added build job as dependency for comment job; updated deploy step to use resolved_tina_branch; added content branch information to PR comment |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| echo "Starting NO-CACHE build process" | ||
| echo "Source branch: ${{ inputs.source_branch || 'Not specified' }}" | ||
| echo "Tina branch: ${{ inputs.tina_branch || vars.NEXT_PUBLIC_TINA_BRANCH || 'Default' }}" | ||
| echo "Tina branch (resolved): ${{ steps.resolve_tina.outputs.resolved_tina_branch }}" |
Copilot
AI
Feb 5, 2026
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.
The step "Log build information" references steps.resolve_tina.outputs.resolved_tina_branch but this step executes before the "Resolve Tina content branch" step is defined (lines 198-227). This will cause the workflow to fail or output an empty value because the step output doesn't exist yet at this point in the execution order. The "Log build information" step should either be moved to after the "Resolve Tina content branch" step, or this log line should be removed/updated.
| echo "Tina branch (resolved): ${{ steps.resolve_tina.outputs.resolved_tina_branch }}" | |
| echo "Tina branch (input): ${{ inputs.tina_branch || 'Not specified' }}" |
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.
✅ Resolved in 6e07e4b
Description
✏️
Falls back to main when a branch with the same name cannot be found in Rules.Content.
Screenshot (optional)
✏️

Same name branch exists in Rules.Content:
Default:
