Skip to content

Commit

Permalink
fix workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
egekocabas committed Nov 17, 2024
1 parent e43a4c9 commit bac39a8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/validate-openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,15 @@ jobs:
with:
fetch-depth: 0

- name: Fetch all branches
run: |
git fetch origin ${{ github.base_ref }}:refs/remotes/origin/${{ github.base_ref }}
git fetch origin ${{ github.head_ref }}:refs/remotes/origin/${{ github.head_ref }}
- name: Check for changes in specified paths
id: check_changes
run: |
CHANGED_PATHS=$(git diff --name-only origin/main ${{ github.head_ref }} | grep -E "^($(echo "$PATHS_TO_CHECK" | tr '\n' '|'))")
CHANGED_PATHS=$(git diff --name-only origin/${{ github.base_ref }} origin/${{ github.head_ref }} | grep -E "^($(echo "$PATHS_TO_CHECK" | tr '\n' '|'))")
if [[ -z "$CHANGED_PATHS" ]]; then
echo "CHANGE_DETECTED=true" >> "$GITHUB_OUTPUT"
Expand Down

0 comments on commit bac39a8

Please sign in to comment.