Skip to content

Commit

Permalink
Add UI procedures for disabling and enabling workflows (github#15316)
Browse files Browse the repository at this point in the history
Co-authored-by: Rachael Sewell <[email protected]>
  • Loading branch information
martin389 and rachmari authored Oct 1, 2020
1 parent f446fcc commit 4b249e8
Show file tree
Hide file tree
Showing 9 changed files with 62 additions and 0 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
title: Disabling and enabling a workflow
intro: You can temporarily disable and re-enable an individual workflow on {% data variables.product.prodname_dotcom %}.
product: '{% data reusables.gated-features.actions %}'
versions:
free-pro-team: '*'
enterprise-server: '>=2.23'
---

{% data reusables.actions.enterprise-beta %}
{% data reusables.actions.enterprise-github-hosted-runners %}

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 {% data variables.product.prodname_dotcom %}.

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 %}

**Warning:** {% data reusables.actions.scheduled-workflows-disabled %}

{% endwarning %}

### Disabling a workflow

You can manually disable a workflow so that it won't execute any workflow runs. A disabled workflow is not deleted, and can be re-enabled.

{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.actions-tab %}
1. In the left sidebar, click the workflow you want to disable.
![actions select workflow](/assets/images/actions-select-workflow.png)
1. Click {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %}.
![actions kebab menu](/assets/images/help/repository/actions-workflow-menu-kebab.png)
1. Click **Disable workflow**.
![actions disable workflow](/assets/images/help/repository/actions-disable-workflow.png)
The disabled workflow is marked {% octicon "stop" aria-label="The stop icon" %} to indicate its status.
![actions list disabled workflow](/assets/images/help/repository/actions-find-disabled-workflow.png)

### Enabling a workflow

You can re-enable a workflow that was previously disabled.

{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.actions-tab %}
1. In the left sidebar, click the workflow you want to enable.
![actions select disabled workflow](/assets/images/help/repository/actions-select-disabled-workflow.png)
1. Click **Enable workflow**.
![actions enable workflow](/assets/images/help/repository/actions-enable-workflow.png)
1 change: 1 addition & 0 deletions content/actions/managing-workflow-runs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ versions:
{% link_in_list /manually-running-a-workflow %}
{% link_in_list /re-running-a-workflow %}
{% link_in_list /canceling-a-workflow %}
{% link_in_list /disabling-and-enabling-a-workflow %}
{% link_in_list /deleting-a-workflow-run %}
{% link_in_list /viewing-job-execution-time %}
{% link_in_list /downloading-workflow-artifacts %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,11 @@ For more information, see:
- "[Disabling or limiting {% data variables.product.prodname_actions %} for a repository](/github/administering-a-repository/disabling-or-limiting-github-actions-for-a-repository)"
- "[Disabling or limiting {% data variables.product.prodname_actions %} for your organization](/github/setting-up-and-managing-organizations-and-teams/disabling-or-limiting-github-actions-for-your-organization)"{% if currentVersion == "free-pro-team@latest" %}
- "[Enforcing {% data variables.product.prodname_actions %} policies in your enterprise account](/github/setting-up-and-managing-your-enterprise-account/enforcing-github-actions-policies-in-your-enterprise-account)" for {% data variables.product.prodname_ghe_cloud %}{% endif %}

### Disabling and enabling workflows

You can enable and disable individual workflows in your repository on {% data variables.product.prodname_dotcom %}.

{% data reusables.actions.scheduled-workflows-disabled %}

For more information, see "[Disabling and enabling a workflow](/actions/managing-workflow-runs/disabling-and-enabling-a-workflow)."
1 change: 1 addition & 0 deletions data/reusables/actions/scheduled-workflows-disabled.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
To prevent unnecessary workflow runs, scheduled workflows may be disabled automatically. When a public repository is forked, scheduled workflows are disabled by default. In a public repository, scheduled workflows are automatically disabled when no repository activity has occurred in 60 days.

0 comments on commit 4b249e8

Please sign in to comment.