Skip to content

Latest commit

 

History

History
31 lines (23 loc) · 753 Bytes

README.md

File metadata and controls

31 lines (23 loc) · 753 Bytes

GitHub Action: Prevent Big Files

This GitHub action checks that your git objects are not too large.

This can be used to help prevent repository bloat by people commiting binaries including executables, images and videos.

Usage

Note that you'll need to fetch all commits between your target branch and your pull request head. This can be most easily via the fetch-depth: 0 option to the actions/checkout action.

Example workflow:

name: Pull Request

on:
  pull_request:
    branches: [ '**' ]

jobs:
  prevent_big_files:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
        with:
          fetch-depth: 0
      - uses: james-callahan/gha-prevent-big-files@main
        with:
          max-size: 4096