ci: add merge conflict resolution for component_index.json in autofix workflow

Handle merge conflicts in the Update Component Index job by:
- Automatically resolving component_index.json conflicts using --theirs strategy
- Failing if non-generated files have conflicts (requires manual resolution)
- Completing the merge after resolving generated file conflicts

This prevents the workflow from failing when component_index.json has conflicts
during PR updates, as this file is auto-generated and can be safely regenerated.
This commit is contained in:
Dhruv Chaturvedi
2026-05-20 16:19:14 +05:30
committed by Dhruv Chaturvedi
parent f3cf09150d
commit e2a2b1bd1b

View File

@ -70,6 +70,7 @@ jobs:
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git fetch origin ${{ github.base_ref }}
git merge origin/${{ github.base_ref }} --no-edit || {
# Check which files have conflicts
CONFLICTED=$(git diff --name-only --diff-filter=U)