You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/actions/monitoring-and-troubleshooting-workflows/troubleshooting-workflows/about-troubleshooting-workflows.md
+67-6Lines changed: 67 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ shortTitle: About troubleshooting
10
10
11
11
{% data reusables.actions.enterprise-github-hosted-runners %}
12
12
13
-
## Troubleshooting your workflows
13
+
## Initial troubleshooting suggestions
14
14
15
15
There are several ways you can troubleshoot failed workflow runs.
16
16
@@ -30,18 +30,79 @@ Each workflow run generates activity logs that you can view, search, and downloa
30
30
31
31
If the workflow logs do not provide enough detail to diagnose why a workflow, job, or step is not working as expected, you can enable additional debug logging. For more information, see [AUTOTITLE](/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging).
32
32
33
-
### Canceling a workflow
33
+
If your workflow uses specific tools or actions, enabling their debug or verbose logging options can help generate more detailed output for troubleshooting.
34
+
For example, you can use `npm install --verbose` for npm or `GIT_TRACE=1 GIT_CURL_VERBOSE=1 git ...` for git.
34
35
35
-
If you attempt to cancel a workflow and the cancellation doesn't succeed, make sure you aren't using the `always` expression. The `always` expression causes a workflow step to run even when the workflow is canceled, which results in a hanging cancellation. For more information, see [AUTOTITLE](/actions/learn-github-actions/expressions#always).
36
+
{% ifversion fpt or ghec %}
37
+
38
+
## Reviewing billing errors
39
+
40
+
Actions usage includes runner minutes and storage for [workflow artifacts](/actions/writing-workflows/choosing-what-your-workflow-does/storing-and-sharing-data-from-a-workflow). For more information, see [AUTOTITLE](/billing/managing-billing-for-your-products/managing-billing-for-github-actions/about-billing-for-github-actions).
41
+
42
+
### Setting a budget
43
+
44
+
Setting an Actions budget may help immediately unblock workflows failing due to billing or storage errors. It will allow further minutes and storage usage to be billed up to the set budget amount. To learn more, see [AUTOTITLE](/billing/managing-your-billing/preventing-overspending).
45
+
46
+
{% endif %}
36
47
37
48
{% ifversion actions-metrics %}
38
49
39
-
## Troubleshooting {% data variables.product.prodname_actions %} inefficiencies
50
+
## Reviewing {% data variables.product.prodname_actions %} activity with metrics
40
51
41
-
To analyze the inefficiencies and reliability of your workflows using metrics, see [AUTOTITLE](/actions/administering-github-actions/viewing-github-actions-metrics).
52
+
To analyze the efficiency and reliability of your workflows using metrics, see [AUTOTITLE](/actions/administering-github-actions/viewing-github-actions-metrics).
42
53
{% endif %}
43
54
44
-
## Troubleshooting self-hosted runners
55
+
## Troubleshooting workflow triggers
56
+
57
+
You can review your workflow’s `on:` field to understand what is expected to trigger the workflow. For more information, see [AUTOTITLE](/actions/writing-workflows/choosing-when-your-workflow-runs/triggering-a-workflow).
58
+
59
+
For a full list of available events, see [AUTOTITLE](/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows).
60
+
61
+
### Triggering event conditions
62
+
63
+
Some triggering events only run from the default branch (i.e. `issues`, `schedule`). Workflow file versions that exist outside of the default branch will not trigger on these events.
64
+
65
+
Workflows will not run on `pull_request` activity if the pull request has a merge conflict.
66
+
67
+
Workflows that would otherwise be triggered on `push` or `pull_request` activity will be skipped if the commit message contains a skip annotation. For more information, see [AUTOTITLE](/actions/managing-workflow-runs-and-deployments/managing-workflow-runs/skipping-workflow-runs).
68
+
69
+
### Scheduled workflows running at unexpected times
70
+
71
+
Scheduled events can be delayed during periods of high loads of {% data variables.product.prodname_actions %} workflow runs.
72
+
73
+
High load times include the start of every hour. If the load is sufficiently high enough, some queued jobs may be dropped. To decrease the chance of delay, schedule your workflow to run at a different time of the hour. For more information, see [AUTOTITLE](/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#schedule).
74
+
75
+
### Filtering and diff limits
76
+
77
+
Specific events allow for filtering by branch, tag, and/or paths you can customize. Workflow run creation will be skipped if the filter conditions apply to filter out the workflow.
78
+
79
+
You can use special characters with filters. For more information, see [AUTOTITLE](/actions/writing-workflows/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet).
80
+
81
+
For path filtering, evaluating diffs is limited to the first 300 files. If there are files changed that are not matched in the first 300 files returned by the filter, the workflow will not be run. For more information, see [AUTOTITLE](/actions/writing-workflows/workflow-syntax-for-github-actions#git-diff-comparisons).
82
+
83
+
## Troubleshoot workflow execution
84
+
85
+
Workflow execution involves any issues seen after the workflow was triggered and a workflow run has been created.
86
+
87
+
### Canceling Workflows
88
+
89
+
If standard cancellation through the [UI](/actions/managing-workflow-runs-and-deployments/managing-workflow-runs/canceling-a-workflow) or [API](/rest/actions/workflow-runs?apiVersion=2022-11-28#cancel-a-workflow-run) does not process as expected, there may be a conditional statement configured for your running workflow job(s) that causes it to not cancel.
90
+
91
+
In these cases, you can leverage the API to force cancel the run. For more information, see [AUTOTITLE](/rest/actions/workflow-runs?apiVersion=2022-11-28#force-cancel-a-workflow-run).
92
+
93
+
A common cause can be using the `always()`[status check function](/actions/writing-workflows/choosing-what-your-workflow-does/evaluate-expressions-in-workflows-and-actions#status-check-functions) which returns `true`, even on cancellation. An alternative is to use the inverse of the `cancelled()` function, `{% raw %}${{ !cancelled() }}{% endraw %}`.
94
+
95
+
For more information, see [AUTOTITLE](/actions/writing-workflows/choosing-when-your-workflow-runs/using-conditions-to-control-job-execution) and [AUTOTITLE](/actions/managing-workflow-runs-and-deployments/managing-workflow-runs/canceling-a-workflow#steps-github-takes-to-cancel-a-workflow-run).
96
+
97
+
## Troubleshooting runners
98
+
99
+
### Defining runner labels
100
+
101
+
{% data variables.product.github %}-hosted runners leverage [preset labels](/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories) maintained through the [`actions/runner-images`](https://github.com/actions/runner-images?tab=readme-ov-file#available-images) repository.
102
+
103
+
We recommend using unique label names for larger and self-hosted runners. If a label matches to any of the existing preset labels, there can be runner assignment issues where there is no guarantee on which matching runner option the job will run on.
104
+
105
+
### Self-hosted runners
45
106
46
107
If you use self-hosted runners, you can view their activity and diagnose common issues.
0 commit comments