Skip to content

Commit

Permalink
clean/fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cameron-dunn-sublime committed Oct 25, 2023
1 parent 3f48d44 commit 0500de6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/rule-validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,18 +139,16 @@ jobs:
id: find_ids
run: |
for file in detection-rules/*.yml; do
echo "$file was changed"
rule_id=$(yq '.id' $file)
if [ ${{ steps.get_base_ref.outputs.run_all != 'true' }} ]; then
if [ ${{ steps.get_base_ref.outputs.run_all }} = 'true']; then
altered_rule_ids=$(echo "$rule_id"" ""$altered_rule_ids")
continue
fi
echo "$file has rule ID $rule_id"
new_source=$(yq '.source' "$file")
old_source=$(yq '.source' "sr-main/detection-rules/$rule_id.yml" || echo '')
echo $old_source
# We only need to care when rule source is changed. This will handle renames, tag changes, etc.
if [ "$new_source" != "$old_source" ]; then
Expand Down

0 comments on commit 0500de6

Please sign in to comment.