仅在阻止请求请求时手动运行GitHub Actions [英] Only run GitHub Actions manually while blocking Pull Request

查看:56
本文介绍了仅在阻止请求请求时手动运行GitHub Actions的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一组GitHub Actions配置为阻止合并合并请求请求,直到Actions成功完成.但是,每次将新提交提交到PR时,操作都会再次运行,如果作者尚未准备好合并并打算进行将来的更改,那么这将非常浪费.有什么办法让GitHub Action仍然阻止PR合并但又不自动运行Action?

I have a set of GitHub Actions configured to block pull requests from being merged until the Actions complete successfully. However, every time a new commit is pushed to a PR, the Actions are run again, which can be very wasteful if the author is not yet ready to merge, and intends to make future changes. Is there any way to have a GitHub Action still block a PR being merged but also not run the Action automatically?

推荐答案

使用此最新更新,您现在可以将拉取请求转换回草稿状态.因此,当您需要进行更改并禁用草稿的配置项时,可以执行此操作.更改完成后,将草稿转换为请求请求以重新运行CI.

With this recent update you can now convert pull requests back to draft status. So you could do that when you need to make changes and disable the CI for drafts. Then convert the draft to a pull request after the changes are complete to rerun CI.

on: pull_request
jobs:
  build:
    if: github.event.pull_request.draft == 'false'
    runs-on: ubuntu-latest
    steps:
      ...

这篇关于仅在阻止请求请求时手动运行GitHub Actions的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆