Skip to content

Commit

Permalink
Revert "own"
Browse files Browse the repository at this point in the history
This reverts commit 2c31ba8.
  • Loading branch information
findepi committed Jul 17, 2024
1 parent 6c6a41c commit 0d22e2e
Showing 1 changed file with 4 additions and 27 deletions.
31 changes: 4 additions & 27 deletions .github/workflows/repo_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,31 +31,8 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check sizes of new Git objects
env:
# 1 MB ought to be enough for anybody.
- uses: james-callahan/gha-prevent-big-files@5bff33da9b9970f671495034b0f7255619b1b8e0
with:
# 1 MB in bytes. 1 MB ought to be enough for anybody.
# TODO in case we may want to consciously commit a bigger file to the repo we may disable the check e.g. with a label
MAX_FILE_SIZE_BYTES: 1048576
shell: bash
run: |
git rev-list --objects ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} \
> new-pr-objects.txt
exit_code=0
while read -r id name; do
size="$(git cat-file -s "${id}")"
if [ "${size}" -gt "${MAX_FILE_SIZE_BYTES}" ]; then
exit_code=1
if [ -z "${name}" ]; then
name="$(git cat-file -t "${id}") ${id}"
fi
echo "Object ${id} [${name}] has size ${size}, exceeding ${MAX_FILE_SIZE_BYTES} limit." >&2
echo "::error::File ${name} has size ${size}, exceeding ${MAX_FILE_SIZE_BYTES} limit."
echo "::error file=${name}::This file has size ${size}, exceeding ${MAX_FILE_SIZE_BYTES} limit."
fi
done < new-pr-objects.txt
exit "${exit_code}"
# - uses: james-callahan/gha-prevent-big-files@5bff33da9b9970f671495034b0f7255619b1b8e0
# with:
# # 1 MB in bytes. 1 MB ought to be enough for anybody.
# # TODO in case we may want to consciously commit a bigger file to the repo we may disable the check e.g. with a label
# max-size: 1048576
max-size: 1048576

0 comments on commit 0d22e2e

Please sign in to comment.