Skip to content

Conversation

@Aibono1225
Copy link
Member

@Aibono1225 Aibono1225 commented Feb 5, 2026

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:
image

Default:
image

@SSWConsulting SSWConsulting deleted a comment from github-actions bot Feb 5, 2026
@Aibono1225 Aibono1225 changed the title Fallback tina branch Deployment slot - Fallback to main when content branch does not exist Feb 5, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 5, 2026

🚀 PR Preview Deployed

Preview URL https://app-sswrules-staging-pr-2436.azurewebsites.net/rules
Slot Name pr-2436
Branch fallback-tina-branch
Content Branch fallback-tina-branch
Commit 6e07e4b51f2e518a606d7c57847c32f5ed6b7925

This preview will be automatically deleted when the PR is closed.

Copy link
Contributor

Copilot AI left a 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 }}"
Copy link

Copilot AI Feb 5, 2026

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.

Suggested change
echo "Tina branch (resolved): ${{ steps.resolve_tina.outputs.resolved_tina_branch }}"
echo "Tina branch (input): ${{ inputs.tina_branch || 'Not specified' }}"

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

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

✅ Resolved in 6e07e4b

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.

1 participant