mirror of
https://github.com/emilk/egui.git
synced 2026-06-26 22:53:14 -04:00
CI: check that all png images are on git LFS (#5321)
To prevent egui repository from growing forever * Sibling PR: https://github.com/emilk/egui/pull/5320
This commit is contained in:
23
.github/workflows/png_only_on_lfs.yml
vendored
Normal file
23
.github/workflows/png_only_on_lfs.yml
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
name: All; .png on git LFS
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
check-binary-files:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Check that png files are on git LFS
|
||||
run: |
|
||||
binary_extensions="png"
|
||||
|
||||
# Find binary files that are not tracked by Git LFS
|
||||
for ext in $binary_extensions; do
|
||||
if comm -23 <(git ls-files | sort) <(git lfs ls-files -n | sort) | grep "\.${ext}$"; then
|
||||
echo "Error: Found binary file with extension .$ext not tracked by git LFS. See CONTRIBUTING.md"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
Reference in New Issue
Block a user