Skip to content

Commit

Permalink
DYN-5753 Add workflow to check file size (#13878)
Browse files Browse the repository at this point in the history
* Add workflow to check file size

* Update check file size workflow to run on pull request
  • Loading branch information
avidit authored May 12, 2023
1 parent 30fae15 commit a89009e
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/check_file_size.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Check file size
on: pull_request

jobs:
check_file_size:
name: Check file size
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Get changed files
id: get_changed_files
uses: tj-actions/changed-files@v35
- name: Check file size
run: |
for file in ${{ steps.get_changed_files.outputs.all_changed_files }}; do
[[ -n $(find ${file} -type f -size +50M) ]] && { echo "❌ $file exceeds file size limit"; exit 1; } || echo "✅ $file"
done

0 comments on commit a89009e

Please sign in to comment.