Skip to content

Commit

Permalink
Triggered the changes only for main base branch
Browse files Browse the repository at this point in the history
  • Loading branch information
srinivasreddy committed Jan 9, 2025
1 parent e3c15ca commit 3ebe034
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/reusable-change-detection.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,15 @@ jobs:
CHANGED_FILES=$(git diff --name-only "origin/$GITHUB_BASE_REF..")
# Check if changes are ONLY in configure/Makefile files
if echo "$CHANGED_FILES" | grep -qE '^(configure.*|Makefile.*|.*\.m4)$' && \
! echo "$CHANGED_FILES" | grep -qvE '^(configure.*|Makefile.*|.*\.m4)$'; then
# Only configure/Makefile files changed, skip Windows CI
echo "run-windows=false" >> "$GITHUB_OUTPUT"
else
# Other files changed, run Windows CI
echo "run-windows=true" >> "$GITHUB_OUTPUT"
if [ "$GITHUB_BASE_REF" = "main" ]; then
if echo "$CHANGED_FILES" | grep -qE '^(configure.*|Makefile.*|.*\.m4)$' && \
! echo "$CHANGED_FILES" | grep -qvE '^(configure.*|Makefile.*|.*\.m4)$'; then
# Only configure/Makefile files changed, skip Windows CI
echo "run-windows=false" >> "$GITHUB_OUTPUT"
else
# Other files changed, run Windows CI
echo "run-windows=true" >> "$GITHUB_OUTPUT"
fi
fi
- name: Compute hash for config cache key
Expand Down

0 comments on commit 3ebe034

Please sign in to comment.