Skip to content

Commit

Permalink
Create filesize check
Browse files Browse the repository at this point in the history
Former-commit-id: bec0d69
  • Loading branch information
hrvolapeter authored Aug 28, 2024
1 parent 3299dc7 commit 28a39c6
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 34,044 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/filesize.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: File size check
on: [pull_request]
jobs:
File-Size:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 2
- name: check size
shell: bash
run: |
CHANGED=`git diff --name-only -r HEAD^1 HEAD`
FAIL=0
while IFS= read -r line; do
SIZE=`find -maxdepth 1 -name "$line" -not -name '*.drawio' -size +2M`
if [ "$SIZE" ]; then
echo -n "File too large: " `du -h $line`
FAIL=1
fi
done <<< "$CHANGED"
exit $FAIL
13,165 changes: 0 additions & 13,165 deletions blueprints/multi-oe/design/OCI_Open_LZ_Multi-OE-Blueprint.drawio

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6268bd1c91ecbe6145b5d2a0342f1552806a927c
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
58c10005e3ba4f67bc2bbc7edf4209e308055a92
20,879 changes: 0 additions & 20,879 deletions blueprints/one-oe/design/OCI_Open_LZ_One-OE-Blueprint.drawio

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
864d77e8342431f9bd28adb932409f1f503a5e28

0 comments on commit 28a39c6

Please sign in to comment.