@htekdev/actions-debugger 1.0.116 → 1.0.118
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/errors/caching-artifacts/cache-key-windows-path-separator-never-matches.yml +107 -0
- package/errors/caching-artifacts/caching-artifacts-069.yml +133 -0
- package/errors/concurrency-timing/rerun-failed-jobs-bypasses-concurrency-group.yml +89 -0
- package/errors/concurrency-timing/workflow-run-head-branch-null-schedule-dispatch-concurrency.yml +135 -0
- package/errors/known-unsolved/empty-matrix-fromjson-workflow-failure-no-conditional-skip.yml +108 -0
- package/errors/known-unsolved/node-action-post-step-wrong-inputs-nested-composite.yml +133 -0
- package/errors/known-unsolved/ubuntu-24-04-arm64-missing-binder-ashmem-kernel-modules.yml +149 -0
- package/errors/permissions-auth/permissions-auth-069.yml +161 -0
- package/errors/runner-environment/arc-autoscalinglistener-ephemeralrunnerset-stale-after-upgrade.yml +134 -0
- package/errors/runner-environment/broker-server-socket-exception-nat-timeout-linux.yml +114 -0
- package/errors/runner-environment/checkout-v603-hash-algorithm-api-rate-limiting.yml +100 -0
- package/errors/runner-environment/macos-self-hosted-listener-aad-ghost-busy-stall.yml +126 -0
- package/errors/runner-environment/runner-environment-210.yml +105 -0
- package/errors/runner-environment/runner-environment-213.yml +142 -0
- package/errors/runner-environment/setup-node-ebaddevengines-devengines-packagemanager.yml +103 -0
- package/errors/runner-environment/ubuntu-24-man-db-dpkg-trigger-apt-install-stall.yml +94 -0
- package/errors/runner-environment/ubuntu-26-04-missing-preinstalled-tools.yml +178 -0
- package/errors/runner-environment/upload-artifact-v6-proxy-headers-leak-strict-proxy-fail.yml +101 -0
- package/errors/silent-failures/silent-failures-108.yml +108 -0
- package/errors/triggers/pull-request-labeled-fires-all-labels-no-name-filter.yml +110 -0
- package/errors/yaml-syntax/duplicate-step-id-within-job-scope-validation-error.yml +130 -0
- package/package.json +1 -1
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
id: triggers-070
|
|
2
|
+
title: '`on: pull_request: types: [labeled]` fires for every label applied to a PR —
|
|
3
|
+
no trigger-level label-name filter exists; must use `if:` condition'
|
|
4
|
+
category: triggers
|
|
5
|
+
severity: silent-failure
|
|
6
|
+
tags:
|
|
7
|
+
- pull_request
|
|
8
|
+
- labeled
|
|
9
|
+
- label
|
|
10
|
+
- types
|
|
11
|
+
- label-name-filter
|
|
12
|
+
- deployment-gate
|
|
13
|
+
patterns:
|
|
14
|
+
- regex: 'types:\s*[\[\n].*labeled'
|
|
15
|
+
flags: 'si'
|
|
16
|
+
error_messages:
|
|
17
|
+
- "No error — workflow runs for every label applied to the PR, including unrelated labels"
|
|
18
|
+
- "No error — workflow run count is higher than expected; runs appear for all label events"
|
|
19
|
+
root_cause: |
|
|
20
|
+
When `types: [labeled]` is added to a `pull_request` trigger, the workflow fires for
|
|
21
|
+
EVERY label applied to the pull request — not only a specific label. There is no
|
|
22
|
+
trigger-level filter for label names. GitHub Actions does not support syntax like
|
|
23
|
+
`types: [labeled: 'deploy-preview']` or `label: 'X'` at the trigger level.
|
|
24
|
+
|
|
25
|
+
Teams building label-gated workflows (deploy-preview, run-integration-tests,
|
|
26
|
+
approved-for-staging, force-rebuild) are surprised to find the workflow fires for
|
|
27
|
+
entirely unrelated labels ('bug', 'enhancement', 'wontfix', 'good first issue').
|
|
28
|
+
The result is:
|
|
29
|
+
- Excessive workflow runs that show up in the Actions tab for every label event
|
|
30
|
+
- Wasted CI minutes for runs that skip all meaningful steps
|
|
31
|
+
- Unexpected side effects if the workflow performs mutations (deploy, comment, notify)
|
|
32
|
+
that should only happen for the specific label
|
|
33
|
+
|
|
34
|
+
This is distinct from the related issue triggers-030 ("labeled NOT in default types"):
|
|
35
|
+
- triggers-030: workflow NEVER fires because labeled is missing from default types
|
|
36
|
+
- triggers-070: workflow fires TOO OFTEN because ALL label events trigger it
|
|
37
|
+
|
|
38
|
+
The behavior is documented: `types: [labeled]` is a webhook activity type filter,
|
|
39
|
+
not a payload content filter. Payload-level filtering (label name, PR author, etc.)
|
|
40
|
+
must be done via `if:` conditions on jobs or steps.
|
|
41
|
+
fix: |
|
|
42
|
+
Add a job-level `if:` condition filtering on `github.event.label.name`. This is the
|
|
43
|
+
only mechanism — no trigger-level label-name filtering exists.
|
|
44
|
+
|
|
45
|
+
Key context properties for label-based filtering:
|
|
46
|
+
- `github.event.action` — 'labeled' or 'unlabeled'
|
|
47
|
+
- `github.event.label.name` — the label JUST applied (only set for labeled/unlabeled events)
|
|
48
|
+
- `github.event.pull_request.labels.*.name` — ALL current labels on the PR (useful for
|
|
49
|
+
opened/synchronize/reopened events where a label may already be present)
|
|
50
|
+
fix_code:
|
|
51
|
+
- language: yaml
|
|
52
|
+
label: 'WRONG — fires for every label including unrelated ones'
|
|
53
|
+
code: |
|
|
54
|
+
on:
|
|
55
|
+
pull_request:
|
|
56
|
+
types: [labeled]
|
|
57
|
+
|
|
58
|
+
jobs:
|
|
59
|
+
deploy-preview:
|
|
60
|
+
runs-on: ubuntu-latest
|
|
61
|
+
steps:
|
|
62
|
+
- run: echo "Deploying preview..."
|
|
63
|
+
# Runs for EVERY label: 'bug', 'wontfix', 'enhancement', 'deploy-preview', etc.
|
|
64
|
+
- language: yaml
|
|
65
|
+
label: 'RIGHT — filter by specific label name with job-level if:'
|
|
66
|
+
code: |
|
|
67
|
+
on:
|
|
68
|
+
pull_request:
|
|
69
|
+
types: [labeled]
|
|
70
|
+
|
|
71
|
+
jobs:
|
|
72
|
+
deploy-preview:
|
|
73
|
+
if: github.event.label.name == 'deploy-preview'
|
|
74
|
+
runs-on: ubuntu-latest
|
|
75
|
+
steps:
|
|
76
|
+
- run: echo "Deploying preview for PR #${{ github.event.pull_request.number }}"
|
|
77
|
+
- language: yaml
|
|
78
|
+
label: 'RIGHT — label gate that works for both labeled events AND already-labeled PRs'
|
|
79
|
+
code: |
|
|
80
|
+
on:
|
|
81
|
+
pull_request:
|
|
82
|
+
types:
|
|
83
|
+
- opened
|
|
84
|
+
- synchronize
|
|
85
|
+
- reopened
|
|
86
|
+
- labeled # fires when any label is applied; filter below by name
|
|
87
|
+
|
|
88
|
+
jobs:
|
|
89
|
+
deploy-preview:
|
|
90
|
+
if: |
|
|
91
|
+
(github.event.action == 'labeled' && github.event.label.name == 'deploy-preview') ||
|
|
92
|
+
(github.event.action != 'labeled' && contains(github.event.pull_request.labels.*.name, 'deploy-preview'))
|
|
93
|
+
runs-on: ubuntu-latest
|
|
94
|
+
steps:
|
|
95
|
+
- run: echo "Deploying preview..."
|
|
96
|
+
prevention:
|
|
97
|
+
- "Always pair `types: [labeled]` with `if: github.event.label.name == 'your-label'` at the job
|
|
98
|
+
level to gate on the specific label."
|
|
99
|
+
- 'Document which label triggers which workflow in a comment near the trigger definition.'
|
|
100
|
+
- 'Test label-gated workflows by applying both the expected label AND an unrelated label to verify
|
|
101
|
+
the `if:` filter correctly skips unintended runs.'
|
|
102
|
+
- 'Consider using only `types: [labeled]` (not opened/sync/reopened) if the workflow should only
|
|
103
|
+
run when the label is freshly applied, not on every code push to already-labeled PRs.'
|
|
104
|
+
docs:
|
|
105
|
+
- url: 'https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#pull_request'
|
|
106
|
+
label: 'GitHub Docs: pull_request event — labeled activity type'
|
|
107
|
+
- url: 'https://docs.github.com/en/webhooks/webhook-events-and-payloads#pull_request'
|
|
108
|
+
label: 'GitHub Webhook Docs: pull_request payload (label field)'
|
|
109
|
+
- url: 'https://stackoverflow.com/questions/62325286/run-github-actions-when-pull-requests-have-a-specific-label'
|
|
110
|
+
label: 'Stack Overflow: Run GitHub Actions when pull requests have a specific label (43 votes)'
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
id: yaml-syntax-071
|
|
2
|
+
title: 'Duplicate `id:` values within the same job or composite action cause instant
|
|
3
|
+
workflow validation failure'
|
|
4
|
+
category: yaml-syntax
|
|
5
|
+
severity: error
|
|
6
|
+
tags:
|
|
7
|
+
- step-id
|
|
8
|
+
- duplicate
|
|
9
|
+
- validation
|
|
10
|
+
- composite-action
|
|
11
|
+
- copy-paste
|
|
12
|
+
patterns:
|
|
13
|
+
- regex: 'The identifier .* may not be used more than once within the same scope'
|
|
14
|
+
flags: 'i'
|
|
15
|
+
- regex: 'TemplateValidationException.*may not be used more than once'
|
|
16
|
+
flags: 'i'
|
|
17
|
+
error_messages:
|
|
18
|
+
- "The workflow is not valid. .github/workflows/ci.yml (Line: N, Col: N): The identifier 'checkout'
|
|
19
|
+
may not be used more than once within the same scope."
|
|
20
|
+
- "The identifier 'meta' may not be used more than once within the same scope."
|
|
21
|
+
- "GitHub.DistributedTask.ObjectTemplating.TemplateValidationException: The template is not valid."
|
|
22
|
+
root_cause: |
|
|
23
|
+
Step IDs (`id:`) must be unique within a single job or composite action. If two or more
|
|
24
|
+
steps within the same scope share the same `id:` value, GitHub Actions rejects the entire
|
|
25
|
+
workflow before any step runs, throwing a `TemplateValidationException`.
|
|
26
|
+
|
|
27
|
+
Step IDs form the keys of the `steps` context object. Duplicate keys would make
|
|
28
|
+
`${{ steps.checkout.outputs.ref }}` ambiguous — the platform rejects this ambiguity at
|
|
29
|
+
parse time rather than silently choosing one arbitrarily at runtime.
|
|
30
|
+
|
|
31
|
+
The most common root cause is copy-pasting steps within a job — particularly repeating
|
|
32
|
+
`actions/checkout`, `docker/metadata-action`, or `actions/setup-node` blocks — without
|
|
33
|
+
updating or removing the `id:` field on the duplicate. Composite action authors also
|
|
34
|
+
hit this when a second action step is added without checking existing IDs.
|
|
35
|
+
|
|
36
|
+
The error message reports only the SECOND occurrence's line and column, not both —
|
|
37
|
+
making it harder to locate the original conflicting step in long step lists.
|
|
38
|
+
(Tracked as actions/runner#3121 as an open bug requesting improved error reporting.)
|
|
39
|
+
fix: |
|
|
40
|
+
Ensure every step that declares an `id:` uses a unique value within its job or composite
|
|
41
|
+
action scope. Steps that are not referenced by later steps can omit `id:` entirely —
|
|
42
|
+
only steps whose outputs are used in expressions (`${{ steps.X.outputs.Y }}`) need an ID.
|
|
43
|
+
fix_code:
|
|
44
|
+
- language: yaml
|
|
45
|
+
label: 'WRONG — duplicate id: "meta" causes TemplateValidationException'
|
|
46
|
+
code: |
|
|
47
|
+
jobs:
|
|
48
|
+
build:
|
|
49
|
+
runs-on: ubuntu-latest
|
|
50
|
+
steps:
|
|
51
|
+
- name: Extract metadata for Docker Hub
|
|
52
|
+
id: meta # first declaration
|
|
53
|
+
uses: docker/metadata-action@v5
|
|
54
|
+
with:
|
|
55
|
+
images: myorg/myapp
|
|
56
|
+
|
|
57
|
+
- name: Extract metadata for GHCR
|
|
58
|
+
id: meta # DUPLICATE — workflow rejected
|
|
59
|
+
uses: docker/metadata-action@v5
|
|
60
|
+
with:
|
|
61
|
+
images: ghcr.io/myorg/myapp
|
|
62
|
+
|
|
63
|
+
- uses: docker/build-push-action@v6
|
|
64
|
+
with:
|
|
65
|
+
tags: ${{ steps.meta.outputs.tags }}
|
|
66
|
+
- language: yaml
|
|
67
|
+
label: 'RIGHT — unique IDs for each step'
|
|
68
|
+
code: |
|
|
69
|
+
jobs:
|
|
70
|
+
build:
|
|
71
|
+
runs-on: ubuntu-latest
|
|
72
|
+
steps:
|
|
73
|
+
- name: Extract metadata for Docker Hub
|
|
74
|
+
id: meta-dockerhub
|
|
75
|
+
uses: docker/metadata-action@v5
|
|
76
|
+
with:
|
|
77
|
+
images: myorg/myapp
|
|
78
|
+
|
|
79
|
+
- name: Extract metadata for GHCR
|
|
80
|
+
id: meta-ghcr
|
|
81
|
+
uses: docker/metadata-action@v5
|
|
82
|
+
with:
|
|
83
|
+
images: ghcr.io/myorg/myapp
|
|
84
|
+
|
|
85
|
+
- name: Build and push to Docker Hub
|
|
86
|
+
uses: docker/build-push-action@v6
|
|
87
|
+
with:
|
|
88
|
+
tags: ${{ steps.meta-dockerhub.outputs.tags }}
|
|
89
|
+
labels: ${{ steps.meta-dockerhub.outputs.labels }}
|
|
90
|
+
|
|
91
|
+
- name: Build and push to GHCR
|
|
92
|
+
uses: docker/build-push-action@v6
|
|
93
|
+
with:
|
|
94
|
+
tags: ${{ steps.meta-ghcr.outputs.tags }}
|
|
95
|
+
labels: ${{ steps.meta-ghcr.outputs.labels }}
|
|
96
|
+
- language: yaml
|
|
97
|
+
label: 'RIGHT — omit id: on steps whose outputs are never referenced'
|
|
98
|
+
code: |
|
|
99
|
+
jobs:
|
|
100
|
+
build:
|
|
101
|
+
runs-on: ubuntu-latest
|
|
102
|
+
steps:
|
|
103
|
+
- uses: actions/checkout@v4
|
|
104
|
+
# No id: needed — outputs not referenced by other steps
|
|
105
|
+
|
|
106
|
+
- uses: actions/setup-node@v4
|
|
107
|
+
with:
|
|
108
|
+
node-version: '20'
|
|
109
|
+
# No id: needed — only referenced outputs need a step id
|
|
110
|
+
|
|
111
|
+
- id: version
|
|
112
|
+
run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
|
|
113
|
+
|
|
114
|
+
- run: echo "Building version ${{ steps.version.outputs.version }}"
|
|
115
|
+
prevention:
|
|
116
|
+
- 'When copy-pasting steps within a job, immediately update or remove the `id:` field on
|
|
117
|
+
the duplicate to avoid the conflict.'
|
|
118
|
+
- 'Use actionlint or a YAML linter locally before pushing — both catch duplicate step IDs
|
|
119
|
+
and report the error with line numbers for both occurrences.'
|
|
120
|
+
- 'Only assign `id:` to steps whose outputs are referenced in expressions elsewhere in the
|
|
121
|
+
job; leave unreferenced steps without `id:`.'
|
|
122
|
+
- 'Apply the same uniqueness rule to composite actions — step IDs within a composite action
|
|
123
|
+
must also be unique within the action file.'
|
|
124
|
+
docs:
|
|
125
|
+
- url: 'https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsid'
|
|
126
|
+
label: 'GitHub Docs: jobs.<job_id>.steps[*].id'
|
|
127
|
+
- url: 'https://github.com/actions/runner/issues/3121'
|
|
128
|
+
label: 'actions/runner#3121 — Request to improve duplicate step ID error message (Jan 2024)'
|
|
129
|
+
- url: 'https://ghlint.twisterrob.net/issues/default/DuplicateStepId/'
|
|
130
|
+
label: 'GH-Lint: DuplicateStepId rule documentation'
|
package/package.json
CHANGED