Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Commit
Β·
85f345c
1
Parent(s):
cd5b559
Add proper permissions to CI job
Browse files- .github/workflows/cd.yml +4 -2
- .github/workflows/ci.yml +12 -8
.github/workflows/cd.yml
CHANGED
@@ -2,7 +2,6 @@ name: Sync to Hugging Face hub
|
|
2 |
on:
|
3 |
push:
|
4 |
branches: [main]
|
5 |
-
pull_request:
|
6 |
|
7 |
# to run this workflow manually from the Actions tab
|
8 |
workflow_dispatch:
|
@@ -18,5 +17,8 @@ jobs:
|
|
18 |
lfs: true
|
19 |
- name: Push to hub
|
20 |
env:
|
|
|
|
|
|
|
21 |
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
22 |
-
run: git push https
|
|
|
2 |
on:
|
3 |
push:
|
4 |
branches: [main]
|
|
|
5 |
|
6 |
# to run this workflow manually from the Actions tab
|
7 |
workflow_dispatch:
|
|
|
17 |
lfs: true
|
18 |
- name: Push to hub
|
19 |
env:
|
20 |
+
HF_USERNAME: ${{ env.HF_USERNAME }}
|
21 |
+
HF_ORGANIZATION: ${{ env.HF_ORGANIZATION }}
|
22 |
+
SPACE_NAME: ${{ env.SPACE_NAME }}
|
23 |
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
24 |
+
run: git push https://$HF_USERNAME:[email protected]/spaces/$HF_ORGANIZATION/$SPACE_NAME main
|
.github/workflows/ci.yml
CHANGED
@@ -1,16 +1,20 @@
|
|
1 |
name: Continuous integration
|
2 |
-
on: [
|
3 |
jobs:
|
4 |
-
|
5 |
runs-on: ubuntu-latest
|
|
|
|
|
6 |
steps:
|
7 |
- name: Check out the repo
|
8 |
uses: actions/checkout@v4
|
9 |
-
-
|
10 |
-
|
|
|
|
|
|
|
11 |
runs-on: ubuntu-latest
|
12 |
steps:
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
filesizelimit: 10485760 # this is 10MB so we can sync to HF Spaces
|
|
|
1 |
name: Continuous integration
|
2 |
+
on: [pull_request]
|
3 |
jobs:
|
4 |
+
check-files-size:
|
5 |
runs-on: ubuntu-latest
|
6 |
+
permissions:
|
7 |
+
pull-requests: write
|
8 |
steps:
|
9 |
- name: Check out the repo
|
10 |
uses: actions/checkout@v4
|
11 |
+
- name: Check large files
|
12 |
+
uses: ppremk/lfs-[email protected]
|
13 |
+
with:
|
14 |
+
filesizelimit: 10485760 # this is 10MB so we can sync to HF Spaces
|
15 |
+
docker-build:
|
16 |
runs-on: ubuntu-latest
|
17 |
steps:
|
18 |
+
- name: Check out the repo
|
19 |
+
uses: actions/checkout@v4
|
20 |
+
- run: docker build .
|
|