Skip to content

Commit

Permalink
feat: unused to remove node_modules
Browse files Browse the repository at this point in the history
  • Loading branch information
SyMind committed Sep 4, 2024
1 parent 73e5660 commit 8e31d60
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions .github/actions/clean/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,6 @@ runs:
fi
fi
if [ -d "node\_modules" ]; then
NODE_MODULES_SIZE=$(du -s node_modules | awk '{print $1}')
MAX_SIZE=$((50 * 1024 * 1024))
echo "MAX_SIZE = $MAX_SIZE"
if [ "$NODE_MODULES_SIZE" -gt "$MAX_SIZE" ]; then
echo "`node_modules` directory size is greater than 50GB, deleting..."
rm -rf node_modules
else
echo "`node_modules` directory size is within limits."
fi
fi
- name: Clean Large Directories by Time
if: ${{ contains(inputs.target, 'windows') }}
shell: bash
Expand All @@ -63,17 +50,3 @@ runs:
echo "'target' directory is within 2 weeks."
fi
fi
if [ -d "node\_modules" ]; then
NODE_MODULES_CREATION_TIME=$(powershell -Command "(Get-Item 'target').CreationTime")
ONE_MONTH_AGO=$(date -d '1 month ago' +%s)
echo "NODE_MODULES_CREATION_TIME = $NODE_MODULES_CREATION_TIME"
if [ "$NODE_MODULES_CREATION_TIME" -lt "$ONE_MONTH_AGO" ]; then
echo "'node_modules' directory is older than 1 month, deleting..."
rm -rf node_modules
else
echo "'node_modules' directory is within 1 month."
fi
fi

0 comments on commit 8e31d60

Please sign in to comment.