Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
alert-triangle

GitHub Action

LFS-warning

v1.1

LFS-warning

alert-triangle

LFS-warning

Checks file sizes in a Pull Request and warns of large files

Installation

Copy and paste the following snippet into your .yml file.

              

- name: LFS-warning

uses: ppremk/lfs-warning@v1.1

Learn more about this action in ppremk/lfs-warning

Choose a version

LFS-Warning action

This action scans files in commits of a Pull Request and compares it against the configured file size limit threshold. If the threshold is exceeded for any of the file, the action will mark the pull request as failed, add a lfs-detected! label and reply with an issue comment containing detected large file(s).

pr-with-lfs-detected

Note: Remember to configure the branch protection rule and select the LFS-warning status when you enable the Required status check to pass option.

status-check

Inputs

filesizelimit

Required, set's the file size limit threshold in bytes. Default "10MB".

Outputs

lfsFiles

Returns an array of possible detected large file(s)

Usage

Consume the action by referencing the stable branch

uses: ppremk/lfs-warning@v1.0
with:
  filesizelimit: '10485760' # 10 MB is 10485760 Bytes