Skip to content

Commit

Permalink
Ensure we look only for results dirs
Browse files Browse the repository at this point in the history
  • Loading branch information
markcmiller86 authored Nov 17, 2024
1 parent c4d6398 commit 7649cf8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/keep_latest60_results.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ jobs:
- name: Cleanup old test results
run: |
# Count the number of top-level directories (assuming they are dated test results)
total_dirs=$(ls -d */ | wc -l)
total_dirs=$(ls -d 20*/ | wc -l)
echo "Total directories: $total_dirs"
# If there are more than 60 directories, delete the oldest
if [ $total_dirs -gt 60 ]; then
# List directories sorted by date and delete the oldest
ls -dt */ | tail -n +61 | xargs rm -rf
ls -dt 20*/ | tail -n +61 | xargs rm -rf
fi
- name: Commit and push changes
Expand Down

0 comments on commit 7649cf8

Please sign in to comment.