Enhance CI workflows: fetch base branch for accurate file comparison

This commit is contained in:
Javier Cortejoso
2026-01-15 09:21:58 +01:00
parent 7cba76f02f
commit ec68519322
4 changed files with 8 additions and 0 deletions

View File

@@ -24,6 +24,8 @@ jobs:
echo "Running for ${{ github.base_ref }} - no path filter"
else
# For dev branch, check if circuits files changed
# Fetch the base branch to ensure it's available for comparison
git fetch origin ${{ github.base_ref }} --depth=1
CHANGED_FILES=$(git diff --name-only origin/${{ github.base_ref }}...HEAD) || {
echo "Error: Failed to diff against base branch"
exit 1

View File

@@ -29,6 +29,8 @@ jobs:
echo "Running for ${{ github.base_ref }} - no path filter"
else
# For dev branch, check if contracts or common files changed
# Fetch the base branch to ensure it's available for comparison
git fetch origin ${{ github.base_ref }} --depth=1
CHANGED_FILES=$(git diff --name-only origin/${{ github.base_ref }}...HEAD) || {
echo "Error: Failed to diff against base branch"
exit 1

View File

@@ -26,6 +26,8 @@ jobs:
echo "Running for ${{ github.base_ref }} - no path filter"
else
# For dev branch, check if relevant files changed
# Fetch the base branch to ensure it's available for comparison
git fetch origin ${{ github.base_ref }} --depth=1
CHANGED_FILES=$(git diff --name-only origin/${{ github.base_ref }}...HEAD) || {
echo "Error: Failed to diff against base branch"
exit 1

View File

@@ -34,6 +34,8 @@ jobs:
echo "Running for ${{ github.base_ref }} - no path filter"
else
# For dev branch, check if relevant files changed
# Fetch the base branch to ensure it's available for comparison
git fetch origin ${{ github.base_ref }} --depth=1
CHANGED_FILES=$(git diff --name-only origin/${{ github.base_ref }}...HEAD) || {
echo "Error: Failed to diff against base branch"
exit 1