Skip to content

Add GitHub Action to check image upload sizes#857

Open
rahulsunil2 wants to merge 2 commits into
openfga:mainfrom
rahulsunil2:rahulsunil2/limit-image-size
Open

Add GitHub Action to check image upload sizes#857
rahulsunil2 wants to merge 2 commits into
openfga:mainfrom
rahulsunil2:rahulsunil2/limit-image-size

Conversation

@rahulsunil2

@rahulsunil2 rahulsunil2 commented Sep 30, 2024

Copy link
Copy Markdown

Add GitHub Action to check image upload sizes

Description

This PR introduces a new GitHub Action workflow that automatically checks the size of image files (jpg, jpeg, png, gif) uploaded in pull requests. The workflow enforces a maximum file size limit of 5MB for all new or modified images. If any image exceeds this limit, the workflow will fail and provide a list of oversized images, helping to maintain repository size and ensure efficient loading of images in the project.

Key features of this workflow:

  • Triggers on pull requests that modify image files
  • Checks only new or modified images
  • Enforces a 5MB size limit (configurable via environment variable)
  • Provides clear error messages with file names and sizes for any oversized images
  • Allows the workflow to pass if all images are within the size limit

References

Review Checklist

  • I have clicked on "allow edits by maintainers".
  • I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
  • The correct base branch is being used, if not main
  • I have added tests to validate that the change in functionality is working as expected

@rahulsunil2 rahulsunil2 requested review from a team as code owners September 30, 2024 19:07
@linux-foundation-easycla

linux-foundation-easycla Bot commented Sep 30, 2024

Copy link
Copy Markdown

CLA Signed


The committers listed above are authorized under a signed CLA.

@rahulsunil2

Copy link
Copy Markdown
Author

This fixes: #633

@curfew-marathon

Copy link
Copy Markdown
Contributor

This PR has had no human activity for 90 days, so it has been marked lifecycle/stale.

This is automated backlog grooming, not a judgment on the work.

What happens next, unless there is activity:

  • In 30 days, it will move to lifecycle/closing-soon
  • 30 days after that, it will be closed

To keep it open, push a commit or leave a comment, and the clock will reset. For work that should not auto-close, such as an RFC or long-running experiment, ask a maintainer to add lifecycle/frozen.

@curfew-marathon curfew-marathon added the lifecycle/stale No human activity in 90 days label Jul 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lifecycle/stale No human activity in 90 days

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants