Skip to content

Commit

Permalink
changed if
Browse files Browse the repository at this point in the history
  • Loading branch information
erjosito committed Sep 27, 2024
1 parent c33233e commit 73e258c
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/autotagv2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
- id: alzimpact
name: Verify whether the modified files have an impact on the ALZ checklist
run: |
echo "DEBUG: Running on $SHELL"
pip install -r ./scripts/requirements.txt
alz_files=$(python3 ./scripts/cl.py list-recos --input-folder ./v2/recos --checklist-file ./v2/checklists/alz.yaml --only-filenames)
alz_files_count=$(echo "$alz_files" | wc -l)
Expand All @@ -29,13 +30,19 @@ jobs:
echo "$alz_files" | tail -2
for input_file in ${{ steps.files.outputs.all }}; do
echo "Processing '$input_file'..."
intersection=`echo "$alz_files" | grep "$input_file"`
echo "Intersection between $input_file and ALZ files is: '$intersection'"
if [[ -z "$intersection" ]]; then
echo "'$input_file' has no ALZ impact"
else
# intersection=$(echo "$alz_files" | grep "$input_file")
# echo "Intersection between $input_file and ALZ files is: '$intersection'"
# if [[ -z "$intersection" ]]; then
# echo "'$input_file' has no ALZ impact"
#else
# echo "Modification to file '$input_file' detected, which seems to be a reco leveraged by the ALZ checklist"
# echo "alz_impact=yes" >> $GITHUB_OUTPUT
#fi
if [[ "$alz_files" == *"$input_file"* ]]; then
echo "Modification to file '$input_file' detected, which seems to be a reco leveraged by the ALZ checklist"
echo "alz_impact=yes" >> $GITHUB_OUTPUT
else
echo "'$input_file' has no ALZ impact"
fi
done
- name: add ALZ label
Expand Down

0 comments on commit 73e258c

Please sign in to comment.