ci: 修复 Gitea Actions runner 标签(ubuntu-latest → self-hosted)
问题:job 一直显示"等待中"
原因:Gitea Actions runner 注册时默认使用自定义标签(self-hosted),
而非 GitHub Actions 约定的 ubuntu-latest
报错:没有匹配 ubuntu-latest 标签的在线运行器
修复:runs-on 从 ubuntu-latest 改为 self-hosted
- build-push job
- vulnerability-scan job
如果 runner 注册时用了其它标签(如 docker / linux / 自定义名字),
仍可调整。修改方法:编辑此 workflow 文件的 runs-on 行。
This commit is contained in:
@@ -39,7 +39,7 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: build-push
|
name: build-push
|
||||||
runs-on: ubuntu-latest # Gitea runner 标签,按实际配置调整
|
runs-on: self-hosted # Gitea runner 默认标签(act_runner 注册时未指定 --labels 时)
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@@ -117,7 +117,7 @@ jobs:
|
|||||||
scan:
|
scan:
|
||||||
name: vulnerability-scan
|
name: vulnerability-scan
|
||||||
needs: build
|
needs: build
|
||||||
runs-on: ubuntu-latest
|
runs-on: self-hosted
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
continue-on-error: true # 扫描失败不阻塞流程
|
continue-on-error: true # 扫描失败不阻塞流程
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user