Skip to content

A Github Action that prevents large files from being added

Notifications You must be signed in to change notification settings

james-callahan/gha-prevent-big-files

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A Github Action that prevents large files from being added

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages