github-actions[bot] commited on
Commit
7fbc098
·
1 Parent(s): 4f8826f

ci: remove CI config before sync

Browse files
Files changed (1) hide show
  1. .cnb.yml +0 -46
.cnb.yml DELETED
@@ -1,46 +0,0 @@
1
-
2
- $:
3
- vscode:
4
- - runner:
5
- cpus: 4
6
- tags: cnb:arch:amd64
7
- docker:
8
- image: cnbcool/default-dev-env:latest
9
- imports:
10
- - https://cnb.cool/maikebuke/Tools/Huggingface/AccessToken/-/blob/main/key.yml
11
- env:
12
- HF_SPACE_URL: "https://huggingface.co/spaces/ServiceX/Sublink"
13
- services:
14
- - vscode
15
- - docker
16
- stages:
17
- - name: vscode go
18
- type: vscode:go
19
-
20
- main:
21
- push:
22
- - runner:
23
- cpus: 1
24
- imports:
25
- - https://cnb.cool/maikebuke/Tools/Huggingface/AccessToken/-/blob/main/key.yml
26
- env:
27
- HF_SPACE_URL: "https://huggingface.co/spaces/ServiceX/Sublink"
28
- stages:
29
- - name: Force Push To Huggingface Spaces
30
- script: |
31
- # 从 HF_SPACE_URL 提取 owner/repo 路径用于构造带认证的 git remote
32
- HF_REPO_PATH=$(echo "$HF_SPACE_URL" | sed 's|https://huggingface.co/spaces/||')
33
- HF_REMOTE="https://user:${HF_TOKEN_FULL}@huggingface.co/spaces/${HF_REPO_PATH}"
34
-
35
- # 删除 CI 文件,避免推送到目标仓库
36
- rm -f .cnb.yml
37
-
38
- git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
39
- git config user.name "github-actions[bot]"
40
-
41
- # 将删除操作提交(基于当前 HEAD)
42
- git add -A
43
- git diff --cached --quiet || git commit -m "ci: remove CI config before sync"
44
-
45
- # 强制推送到 Huggingface Space
46
- git push "$HF_REMOTE" HEAD:main --force