Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Copilot Lvl 3
Message 1 of 4

How can I disable a github action?

Is it possible to disable a github action - preferably by setting a boolean value somewhere in the .yml file itself?

3 Replies
Highlighted
GitHub Partner
Message 2 of 4

Re: How can I disable a github action?

If you want to disable the Actions feature on your repository, and do not run any workflow on your repository, you can directly delete all the YAML files under .github/workflow from your repository.

And you also can disable GitHub Actions feature on repository level and Organization level.

To disable Actions on a specific repository, on the Settings tab of this repository, navigate to Actions, select Disable Actions for this repository .

To disable Actions on a specific Organization, navigate to Organization settings > Member privileges, select Disable Actions for the organization , this will disable Actions on all repositories in this Organization.

Reference this earlier reported ticket to get more details: https://github.community/t5/GitHub-Actions/how-do-I-get-rid-of-github-workflow/td-p/39568

 

If you want to skip executing an action when running your workflow, you can use the syntax jobs.<job_id>.steps.if to setup a condition to skip the step that executes the action.

Highlighted
Copilot Lvl 2
Message 3 of 4

Re: How can I disable a github action?

Would still be great if I could disable a complete workflow (not just single steps) temporarily within the YML file by setting a boolean value.

Highlighted
Ground Controller Lvl 2
Message 4 of 4

Re: How can I disable a github action?

You can disable it by "ignoring it always", i.e.

 

on:
  push:
    branches-ignore:
      - '**'