mirror of
https://github.com/kuhyx/WUT_Computer_Science.git
synced 2026-07-04 18:43:15 +02:00
git-subtree-dir: Programming/PORR git-subtree-mainline:9576b25315git-subtree-split:0a62d75a82
22 lines
529 B
YAML
22 lines
529 B
YAML
name: Check for Large Files
|
|
|
|
on: push
|
|
|
|
jobs:
|
|
check-large-files:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Check File Sizes
|
|
run: |
|
|
max_size=$((2 * 1024 * 1024 * 1024))
|
|
for file in $(git ls-tree -r HEAD --name-only); do
|
|
size=$(stat --printf="%s" "$file")
|
|
if [ "$size" -gt "$max_size" ]; then
|
|
echo "Error: $file exceeds 2GB."
|
|
exit 1
|
|
fi
|
|
done
|