In this guide, you’ll learn how to prevent unnecessary GitHub Actions runs by skipping workflows via commit messages, as well as how to cancel jobs that are already in progress.Documentation Index
Fetch the complete documentation index at: https://notes.kodekloud.com/llms.txt
Use this file to discover all available pages before exploring further.
Skipping Workflows via Commit Messages
When you include specific keywords in your commit message, GitHub Actions will ignorepush and pull_request events for that commit. This helps you save CI minutes and speed up your development process.
Skipping workflows with commit messages is case-insensitive and works with or without brackets.
Supported Keywords
| Pattern | Description |
|---|---|
| skip ci | Basic skip command |
| ci skip | Alternate skip command |
| [skip ci] | Bracketed skip |
| [ci skip] | Bracketed alternate skip |
You can also place a footer after two blank lines in your commit message:
Example
Imagine you only changed the documentation inREADME.md and want to skip all workflows:
[skip ci], GitHub Actions will skip every workflow for that push. Visit the Actions tab in your repository to confirm there are no new runs.
Cancelling In-Progress Workflow Runs
If you need to stop a workflow that’s already running, follow these steps:- Go to the Actions tab in your GitHub repository.
- Select the workflow run you wish to cancel.
- Click Cancel workflow in the top-right corner.
Cancelling a workflow does not roll back any completed jobs or deployed artifacts. Ensure you manually revert changes if necessary.