Remarque
Les exécuteurs hébergés sur GitHub ne sont pas pris en charge sur GitHub Enterprise Server. Vous pouvez voir plus d’informations sur le support futur planifié dans la 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).
Avertissement
Pour éviter toute exécution de workflow inutile, les workflows planifiés peuvent être désactivés automatiquement. Quand un dépôt public est dupliqué, les workflows planifiés sont désactivés par défaut. Dans un dépôt public, les workflows planifiés sont automatiquement désactivés quand aucune activité de dépôt n’a eu lieu pendant 60 jours.
You can also disable and enable a workflow using the REST API. For more information, see Points de terminaison d’API REST pour les workflows.
Disabling a workflow
-
Sur GitHub, accédez à la page principale du référentiel.
-
Sous le nom de votre dépôt, cliquez sur Actions.
-
In the left sidebar, click the workflow you want to disable.
-
Click to display a dropdown menu and click Disable workflow.
Remarque
Pour plus d’informations sur GitHub CLI, consultez À propos de 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.
-
Sur GitHub, accédez à la page principale du référentiel.
-
Sous le nom de votre dépôt, cliquez sur 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