Skip to content

Commit

Permalink
exclude deleted config from workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Manh Cao committed Sep 20, 2024
1 parent 72132ab commit 0ff15ce
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/validate-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
types: [opened, synchronize, reopened]
branches:
- 'main'
- 'exclude-deleted-config-from-workflow'

jobs:
validate_json_files:
Expand Down Expand Up @@ -34,5 +35,7 @@ jobs:

- name: Validate JSON files
run: |
echo $HEAD_SHA
echo $MAIN_SHA
CHANGED_PROTOCOLS=$(git diff --name-only $HEAD_SHA $MAIN_SHA -- 'protocols/*' | grep -v '^D' | grep '^protocols/' | xargs -L1 dirname | sed 's|protocols/||' | sort -u)
CHANGED_PROTOCOLS=$CHANGED_PROTOCOLS node validate-config.js

0 comments on commit 0ff15ce

Please sign in to comment.