-
Notifications
You must be signed in to change notification settings - Fork 3
32 lines (27 loc) · 1.02 KB
/
check_file_size.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
####################################
# This workflow will check the file size does not exceed 10MB
# secrets:
# - GITHUB_TOKEN: GitHub API token with some extra permissions
# (octokit.rest.issues.[addLabels|listLabelsOnIssue|removeLabel|getLabel|createLabel|createComment],
# octokit.rest.pulls.listFiles, octokit.rest.git.getBlob, core.setFailed: set PR status to failed)
####################################
name: Check file size
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch: # to run this workflow manually from the Actions tab
permissions: # Sets permissions of the GITHUB_TOKEN to allow lfs warning to work properly
contents: read
pull-requests: write
jobs:
check_file_size:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check large files
uses: ppremk/lfs-warning@v3.2
with:
token: ${{ secrets.GITHUB_TOKEN }} # required with some permissions
filesizelimit: 10MB # < 10MB so we can sync to HF Spaces