File tree Expand file tree Collapse file tree 2 files changed +20
-3
lines changed
Expand file tree Collapse file tree 2 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -121,18 +121,26 @@ jobs:
121121 fi
122122 done
123123
124- # Reset .csproj files and Directory.Build.props to target branch versions
125- echo "📝 Resetting .csproj files and Directory.Build.props to ${{ matrix.target_branch }} versions..."
124+ # Reset files that should stay as they are in the target branch
125+ echo "📝 Resetting files that should remain from ${{ matrix.target_branch }}..."
126+
127+ # Reset all .csproj files
126128 find . -name "*.csproj" -type f -exec git checkout ${{ matrix.target_branch }} -- {} \;
127129
128- # Also reset Directory.Build.props to keep the net8 version
130+ # Reset Directory.Build.props to keep the net8 version
129131 if [ -f "src/Directory.Build.props" ]; then
130132 echo "📝 Resetting Directory.Build.props to ${{ matrix.target_branch }} version..."
131133 git checkout ${{ matrix.target_branch }} -- src/Directory.Build.props
132134
133135 echo "Directory.Build.props from ${{ matrix.target_branch }}:"
134136 grep -E "<Version>|<TargetFramework>" src/Directory.Build.props
135137 fi
138+
139+ # Reset workflow files to avoid including workflow changes in the PR
140+ echo "📝 Resetting workflow files to ${{ matrix.target_branch }} version..."
141+ if [ -d ".github/workflows" ]; then
142+ git checkout ${{ matrix.target_branch }} -- .github/workflows/ || true
143+ fi
136144
137145
138146 # Stage all changes
Original file line number Diff line number Diff line change 1+ // Test file to demonstrate branch sync
2+ // This file is added to main and should be synced to net8
3+ namespace Test
4+ {
5+ public class TestSync
6+ {
7+ public string Message => "This change is from main branch" ;
8+ }
9+ }
You can’t perform that action at this time.
0 commit comments