maxhuber commited on
Commit
f74c4bf
·
2 Parent(s): 7281df1 07470e8

Merge branch 'main' of https://github.com/MaxHuber888/deepsquid

Browse files
Files changed (1) hide show
  1. .github/workflows/main.yml +12 -8
.github/workflows/main.yml CHANGED
@@ -1,33 +1,37 @@
1
  name: Check file size and Sync to Hugging Face hub
2
-
3
  on:
4
  push:
5
  branches: [main]
6
-
7
  pull_request:
8
  branches: [main]
9
-
10
  workflow_dispatch:
11
 
12
  jobs:
13
  check-file-size:
14
  runs-on: ubuntu-latest
15
  steps:
 
16
  - name: Check large files
17
- uses: ActionsDesk/[email protected]
18
- with:
19
- filesizelimit: 10485760 # 10MB
 
 
 
 
 
 
 
 
20
 
21
  sync-to-hub:
22
  needs: check-file-size
23
  runs-on: ubuntu-latest
24
-
25
  steps:
26
  - uses: actions/checkout@v3
27
  with:
28
  fetch-depth: 0
29
  lfs: true
30
-
31
  - name: Push to hub
32
  env:
33
  HF_TOKEN: ${{ secrets.HF_TOKEN }}
 
1
  name: Check file size and Sync to Hugging Face hub
 
2
  on:
3
  push:
4
  branches: [main]
 
5
  pull_request:
6
  branches: [main]
 
7
  workflow_dispatch:
8
 
9
  jobs:
10
  check-file-size:
11
  runs-on: ubuntu-latest
12
  steps:
13
+ - uses: actions/checkout@v3
14
  - name: Check large files
15
+ run: |
16
+ #!/bin/bash
17
+ max_size=10485760 # 10MB in bytes
18
+ large_files=$(find . -type f -size +${max_size}c)
19
+ if [ -n "$large_files" ]; then
20
+ echo "Warning: The following files are larger than 10MB:"
21
+ echo "$large_files"
22
+ exit 1
23
+ else
24
+ echo "No files larger than 10MB found."
25
+ fi
26
 
27
  sync-to-hub:
28
  needs: check-file-size
29
  runs-on: ubuntu-latest
 
30
  steps:
31
  - uses: actions/checkout@v3
32
  with:
33
  fetch-depth: 0
34
  lfs: true
 
35
  - name: Push to hub
36
  env:
37
  HF_TOKEN: ${{ secrets.HF_TOKEN }}