Observação: no momento, não há suporte para os executores hospedados no GitHub no GitHub Enterprise Server. Você pode ver mais informações sobre o suporte futuro planejado no GitHub public roadmap.
Disabling a workflow allows you to stop a workflow from being triggered without having to delete the file from the repo. You can easily re-enable the workflow again on GitHub.
Temporarily disabling a workflow can be useful in many scenarios. These are a few examples where disabling a workflow might be helpful:
- A workflow error that produces too many or wrong requests, impacting external services negatively.
- A workflow that is not critical and is consuming too many minutes on your account.
- A workflow that sends requests to a service that is down.
- Workflows on a forked repository that aren't needed (for example, scheduled workflows).
Warning: Para evitar execuções desnecessárias do fluxo de trabalho, os fluxos de trabalho programados podem ser desabilitados automaticamente. Quando um repositório público é bifurcado, os fluxos de trabalho programados são desabilitados por padrão. Em um repositório público, os fluxos de trabalho agendados são automaticamente desabilitados quando nenhuma atividade do repositório ocorreu em 60 dias.
You can also disable and enable a workflow using the REST API. For more information, see the "Actions REST API."
Disabling a workflow
-
On your GitHub Enterprise Server instance, navigate to the main page of the repository.
-
Abaixo do nome do repositório, clique em Actions.
-
In the left sidebar, click the workflow you want to disable.
-
Click .
-
Click Disable workflow.
The disabled workflow is marked to indicate its status.
Para saber mais sobre a GitHub CLI, confira "Sobre a GitHub CLI".
To disable a workflow, use the workflow disable
subcommand. Replace workflow
with either the name, ID, or file name of the workflow you want to disable. For example, "Link Checker"
, 1234567
, or "link-check-test.yml"
. If you don't specify a workflow, GitHub CLI returns an interactive menu for you to choose a workflow.
gh workflow disable WORKFLOW
Enabling a workflow
You can re-enable a workflow that was previously disabled.
-
On your GitHub Enterprise Server instance, navigate to the main page of the repository.
-
Abaixo do nome do repositório, clique em Actions.
-
In the left sidebar, click the workflow you want to enable.
-
Click Enable workflow.
To enable a workflow, use the workflow enable
subcommand. Replace workflow
with either the name, ID, or file name of the workflow you want to enable. For example, "Link Checker"
, 1234567
, or "link-check-test.yml"
. If you don't specify a workflow, GitHub CLI returns an interactive menu for you to choose a workflow.
gh workflow enable WORKFLOW