Drone CI 中文文档

更新存储库 (drone repo update)

该子命令用于更新指定的存储库。请注意,该命令需要对存储库拥有写访问权限。

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
NAME:
   drone repo update - update a repository

USAGE:
   drone repo update [command options] <repo/name>

OPTIONS:
   --trusted                    repository is trusted
   --protected                  repository is protected
   --timeout value              repository timeout (default: 0s)
   --visibility value           repository visibility
   --ignore-forks               ignore forks
   --ignore-pull-requests       ignore pull requests
   --auto-cancel-pull-requests  automatically cancel pending pull request builds
   --auto-cancel-pushes         automatically cancel pending push builds
   --auto-cancel-running        automatically cancel running builds if newer commit pushed
   --config value               repository configuration path (e.g. .drone.yml)
   --build-counter value        repository starting build number (default: 0)
   --unsafe                     validate updating the build-counter is unsafe

以下是「更新 trusted 标志」的示例命令:

1
drone repo update octocat/hello-world --trusted=true

以下是「更新 protected 标志」的示例命令:

1
drone repo update octocat/hello-world --protected=true

以下是「更新超时时间值」的示例命令:

1
drone repo update octocat/hello-world --timeout=90m

以下是「更新 drone.yml 文件路径」的示例命令:

1
drone repo update octocat/hello-world --config=.github/.drone.yml

以下是「更新当前构建号」的示例命令:

1
drone repo update octocat/hello-world --build-counter=10 --unsafe

以下是「更新自动取消标志」的示例命令:

1
2
drone repo update octocat/hello-world --auto-cancel-pushes=true
drone repo update octocat/hello-world --auto-cancel-pull-requests=true