@htekdev/actions-debugger 1.0.0 → 1.0.2
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/LICENSE +21 -21
- package/README.md +108 -108
- package/errors/_schema.json +89 -89
- package/errors/caching-artifacts/artifact-storage-quota-exceeded.yml +118 -0
- package/errors/caching-artifacts/cache-miss.yml +56 -56
- package/errors/caching-artifacts/cache-save-cancelled-job.yml +82 -0
- package/errors/caching-artifacts/cache-v3-to-v4-breaking-changes.yml +95 -0
- package/errors/caching-artifacts/cross-repo-artifacts-not-supported.yml +102 -0
- package/errors/caching-artifacts/upload-artifact-no-files-found.yml +92 -0
- package/errors/caching-artifacts/upload-artifact-v4-breaking.yml +67 -67
- package/errors/concurrency-timing/cancel-in-progress-deploy-drops.yml +97 -0
- package/errors/concurrency-timing/jobs-cancelled-unexpectedly.yml +60 -60
- package/errors/concurrency-timing/skipped-needs-cascade.yml +103 -0
- package/errors/concurrency-timing/workflow-run-conclusion-unchecked.yml +100 -0
- package/errors/known-unsolved/composite-input-env-vars-missing.yml +91 -0
- package/errors/known-unsolved/composite-nested-outputs-null.yml +101 -0
- package/errors/known-unsolved/no-dynamic-secret-access.yml +111 -0
- package/errors/known-unsolved/no-step-level-rerun.yml +94 -0
- package/errors/known-unsolved/no-step-retry.yml +53 -53
- package/errors/known-unsolved/workflow-rerun-limit.yml +101 -0
- package/errors/permissions-auth/checkout-submodule-private-auth.yml +91 -0
- package/errors/permissions-auth/fork-pr-secrets-unavailable.yml +97 -0
- package/errors/permissions-auth/gcp-oidc-workload-identity-misconfigured.yml +130 -0
- package/errors/permissions-auth/github-token-403.yml +64 -64
- package/errors/permissions-auth/github-token-protected-branch-push.yml +109 -0
- package/errors/permissions-auth/oidc-aws-failure.yml +85 -85
- package/errors/permissions-auth/oidc-azure-subject-mismatch.yml +91 -0
- package/errors/runner-environment/disk-space.yml +57 -57
- package/errors/runner-environment/docker-buildx-not-setup.yml +106 -0
- package/errors/runner-environment/macos-homebrew-path.yml +90 -0
- package/errors/runner-environment/node-runtime-deprecation.yml +56 -56
- package/errors/runner-environment/node20-to-node24-migration.yml +118 -0
- package/errors/runner-environment/npm-ci-lockfile-mismatch.yml +112 -0
- package/errors/runner-environment/self-hosted-stale-toolcache.yml +73 -0
- package/errors/runner-environment/setup-node-version-file-missing.yml +105 -0
- package/errors/runner-environment/windows-execution-policy.yml +83 -0
- package/errors/silent-failures/add-mask-no-retroactive-masking.yml +75 -0
- package/errors/silent-failures/composite-boolean-inputs-as-strings.yml +110 -0
- package/errors/silent-failures/conditional-output-null-downstream.yml +82 -0
- package/errors/silent-failures/continue-on-error-masks-failure.yml +86 -0
- package/errors/silent-failures/github-token-no-trigger.yml +57 -57
- package/errors/silent-failures/reusable-workflow-env-secrets-empty.yml +90 -0
- package/errors/silent-failures/scheduled-workflow-disabled.yml +59 -59
- package/errors/silent-failures/sparse-checkout-sticky-cone-mode.yml +120 -0
- package/errors/triggers/cron-schedule-late.yml +59 -59
- package/errors/triggers/pull-request-target-rce-risk.yml +117 -0
- package/errors/triggers/workflow-not-triggering.yml +60 -60
- package/errors/triggers/workflow-run-default-branch-requirement.yml +78 -0
- package/errors/yaml-syntax/anchors-not-supported.yml +95 -0
- package/errors/yaml-syntax/dynamic-matrix-fromjson-failure.yml +99 -0
- package/errors/yaml-syntax/if-always-true.yml +52 -52
- package/errors/yaml-syntax/missing-expression-wrapper.yml +67 -0
- package/errors/yaml-syntax/needs-indirect-outputs.yml +91 -0
- package/errors/yaml-syntax/reusable-workflow-missing-output-declaration.yml +140 -0
- package/errors/yaml-syntax/secrets-in-if.yml +55 -55
- package/errors/yaml-syntax/unexpected-yaml-key.yml +69 -69
- package/errors/yaml-syntax/working-directory-ignored-on-uses.yml +66 -0
- package/package.json +70 -67
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
id: runner-environment-002
|
|
2
|
-
title: "Runner Out of Disk Space"
|
|
3
|
-
category: runner-environment
|
|
4
|
-
severity: error
|
|
5
|
-
tags:
|
|
6
|
-
- runner
|
|
7
|
-
- disk-space
|
|
8
|
-
- docker
|
|
9
|
-
- enospc
|
|
10
|
-
- ubuntu-latest
|
|
11
|
-
patterns:
|
|
12
|
-
- regex: "No space left on device"
|
|
13
|
-
flags: "i"
|
|
14
|
-
- regex: "ENOSPC"
|
|
15
|
-
flags: "i"
|
|
16
|
-
- regex: "write .+ no space left on device"
|
|
17
|
-
flags: "i"
|
|
18
|
-
error_messages:
|
|
19
|
-
- "No space left on device"
|
|
20
|
-
- "ENOSPC: no space left on device"
|
|
21
|
-
root_cause: |
|
|
22
|
-
GitHub-hosted runners have finite disk space, and large Docker layers, Android SDKs,
|
|
23
|
-
toolchains, browser caches, or build artifacts can exhaust it mid-job. This frequently
|
|
24
|
-
shows up on `ubuntu-latest` when workflows build containers or multiple large targets.
|
|
25
|
-
|
|
26
|
-
The underlying job logic may be correct, but the runner image simply runs out of storage.
|
|
27
|
-
fix: |
|
|
28
|
-
Free disk space early in the job, reduce artifact retention, and avoid downloading heavy
|
|
29
|
-
toolchains you do not need. If the workload is consistently too large, move the job to a
|
|
30
|
-
larger runner or split the build across jobs.
|
|
31
|
-
fix_code:
|
|
32
|
-
- language: yaml
|
|
33
|
-
label: "Free disk space before heavy build steps"
|
|
34
|
-
code: |
|
|
35
|
-
jobs:
|
|
36
|
-
build:
|
|
37
|
-
runs-on: ubuntu-latest
|
|
38
|
-
steps:
|
|
39
|
-
- uses: actions/checkout@v4
|
|
40
|
-
- uses: jlumbroso/free-disk-space@v1
|
|
41
|
-
with:
|
|
42
|
-
large-packages: true
|
|
43
|
-
docker-images: true
|
|
44
|
-
tool-cache: false
|
|
45
|
-
- run: docker build -t app .
|
|
46
|
-
prevention:
|
|
47
|
-
- "Measure disk usage before and after large build steps with `df -h`."
|
|
48
|
-
- "Delete temporary artifacts and caches you do not need inside the job."
|
|
49
|
-
- "Avoid monolithic jobs that build every target on one runner."
|
|
50
|
-
docs:
|
|
51
|
-
- url: "https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners"
|
|
52
|
-
label: "About GitHub-hosted runners"
|
|
53
|
-
- url: "https://docs.github.com/en/actions/using-jobs/choosing-the-runner-for-a-job"
|
|
54
|
-
label: "Choosing the runner for a job"
|
|
55
|
-
source:
|
|
56
|
-
article: "https://htek.dev/articles/github-actions-debugging-guide"
|
|
57
|
-
section: "Runner disk space exhaustion"
|
|
1
|
+
id: runner-environment-002
|
|
2
|
+
title: "Runner Out of Disk Space"
|
|
3
|
+
category: runner-environment
|
|
4
|
+
severity: error
|
|
5
|
+
tags:
|
|
6
|
+
- runner
|
|
7
|
+
- disk-space
|
|
8
|
+
- docker
|
|
9
|
+
- enospc
|
|
10
|
+
- ubuntu-latest
|
|
11
|
+
patterns:
|
|
12
|
+
- regex: "No space left on device"
|
|
13
|
+
flags: "i"
|
|
14
|
+
- regex: "ENOSPC"
|
|
15
|
+
flags: "i"
|
|
16
|
+
- regex: "write .+ no space left on device"
|
|
17
|
+
flags: "i"
|
|
18
|
+
error_messages:
|
|
19
|
+
- "No space left on device"
|
|
20
|
+
- "ENOSPC: no space left on device"
|
|
21
|
+
root_cause: |
|
|
22
|
+
GitHub-hosted runners have finite disk space, and large Docker layers, Android SDKs,
|
|
23
|
+
toolchains, browser caches, or build artifacts can exhaust it mid-job. This frequently
|
|
24
|
+
shows up on `ubuntu-latest` when workflows build containers or multiple large targets.
|
|
25
|
+
|
|
26
|
+
The underlying job logic may be correct, but the runner image simply runs out of storage.
|
|
27
|
+
fix: |
|
|
28
|
+
Free disk space early in the job, reduce artifact retention, and avoid downloading heavy
|
|
29
|
+
toolchains you do not need. If the workload is consistently too large, move the job to a
|
|
30
|
+
larger runner or split the build across jobs.
|
|
31
|
+
fix_code:
|
|
32
|
+
- language: yaml
|
|
33
|
+
label: "Free disk space before heavy build steps"
|
|
34
|
+
code: |
|
|
35
|
+
jobs:
|
|
36
|
+
build:
|
|
37
|
+
runs-on: ubuntu-latest
|
|
38
|
+
steps:
|
|
39
|
+
- uses: actions/checkout@v4
|
|
40
|
+
- uses: jlumbroso/free-disk-space@v1
|
|
41
|
+
with:
|
|
42
|
+
large-packages: true
|
|
43
|
+
docker-images: true
|
|
44
|
+
tool-cache: false
|
|
45
|
+
- run: docker build -t app .
|
|
46
|
+
prevention:
|
|
47
|
+
- "Measure disk usage before and after large build steps with `df -h`."
|
|
48
|
+
- "Delete temporary artifacts and caches you do not need inside the job."
|
|
49
|
+
- "Avoid monolithic jobs that build every target on one runner."
|
|
50
|
+
docs:
|
|
51
|
+
- url: "https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners"
|
|
52
|
+
label: "About GitHub-hosted runners"
|
|
53
|
+
- url: "https://docs.github.com/en/actions/using-jobs/choosing-the-runner-for-a-job"
|
|
54
|
+
label: "Choosing the runner for a job"
|
|
55
|
+
source:
|
|
56
|
+
article: "https://htek.dev/articles/github-actions-debugging-guide"
|
|
57
|
+
section: "Runner disk space exhaustion"
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
id: runner-environment-014
|
|
2
|
+
title: "Docker BuildKit / buildx Not Enabled by Default — Legacy Build Flags Fail"
|
|
3
|
+
category: runner-environment
|
|
4
|
+
severity: error
|
|
5
|
+
tags:
|
|
6
|
+
- docker
|
|
7
|
+
- buildx
|
|
8
|
+
- BuildKit
|
|
9
|
+
- multi-platform
|
|
10
|
+
- cache-from
|
|
11
|
+
- runner
|
|
12
|
+
- container
|
|
13
|
+
patterns:
|
|
14
|
+
- regex: "buildx.*not found"
|
|
15
|
+
flags: "i"
|
|
16
|
+
- regex: "failed to solve.*no matching manifest"
|
|
17
|
+
flags: "i"
|
|
18
|
+
- regex: "DOCKER_BUILDKIT.*invalid"
|
|
19
|
+
flags: "i"
|
|
20
|
+
- regex: "multi-platform build is not supported"
|
|
21
|
+
flags: "i"
|
|
22
|
+
- regex: "unknown flag: --platform"
|
|
23
|
+
flags: "i"
|
|
24
|
+
error_messages:
|
|
25
|
+
- "ERROR: multiple platforms feature is currently not supported for docker driver."
|
|
26
|
+
- "error: failed to solve: no matching manifest for linux/arm64 in the manifest list entries"
|
|
27
|
+
- "unknown flag: --platform"
|
|
28
|
+
- "docker: 'buildx' is not a docker command."
|
|
29
|
+
root_cause: |
|
|
30
|
+
GitHub Actions runners ship with Docker installed, but the default `docker` driver
|
|
31
|
+
does not support multi-platform builds (`--platform linux/arm64,linux/amd64`) or
|
|
32
|
+
advanced BuildKit features like `--cache-from=type=gha`. These require the `docker-container`
|
|
33
|
+
driver via `docker buildx`.
|
|
34
|
+
|
|
35
|
+
On Ubuntu runners, `DOCKER_BUILDKIT=1` is available but `buildx` multi-platform support
|
|
36
|
+
requires a buildx builder instance to be set up explicitly. When workflows use
|
|
37
|
+
`docker/build-push-action@v5` or `docker buildx build` without first running
|
|
38
|
+
`docker/setup-buildx-action`, the build fails with driver capability errors.
|
|
39
|
+
|
|
40
|
+
Additionally, `cache-from: type=gha` (GitHub Actions cache) only works with the
|
|
41
|
+
BuildKit `docker-container` driver — it fails silently or errors on the default `docker`
|
|
42
|
+
driver.
|
|
43
|
+
fix: |
|
|
44
|
+
Always call `docker/setup-buildx-action` before any `docker buildx` command or before
|
|
45
|
+
using `docker/build-push-action`. For multi-platform builds, pass the platform list
|
|
46
|
+
to the setup step.
|
|
47
|
+
fix_code:
|
|
48
|
+
- language: yaml
|
|
49
|
+
label: "WRONG — multi-platform build without buildx setup"
|
|
50
|
+
code: |
|
|
51
|
+
steps:
|
|
52
|
+
- uses: actions/checkout@v4
|
|
53
|
+
- name: Build multi-platform image
|
|
54
|
+
run: |
|
|
55
|
+
docker buildx build --platform linux/amd64,linux/arm64 -t myapp:latest .
|
|
56
|
+
# ERROR: multiple platforms feature is currently not supported for docker driver
|
|
57
|
+
- language: yaml
|
|
58
|
+
label: "CORRECT — setup buildx before multi-platform build"
|
|
59
|
+
code: |
|
|
60
|
+
steps:
|
|
61
|
+
- uses: actions/checkout@v4
|
|
62
|
+
|
|
63
|
+
- name: Set up Docker Buildx
|
|
64
|
+
uses: docker/setup-buildx-action@v3 # creates docker-container driver
|
|
65
|
+
|
|
66
|
+
- name: Login to registry
|
|
67
|
+
uses: docker/login-action@v3
|
|
68
|
+
with:
|
|
69
|
+
registry: ghcr.io
|
|
70
|
+
username: ${{ github.actor }}
|
|
71
|
+
password: ${{ secrets.GITHUB_TOKEN }}
|
|
72
|
+
|
|
73
|
+
- name: Build and push
|
|
74
|
+
uses: docker/build-push-action@v6
|
|
75
|
+
with:
|
|
76
|
+
context: .
|
|
77
|
+
platforms: linux/amd64,linux/arm64
|
|
78
|
+
push: true
|
|
79
|
+
tags: ghcr.io/${{ github.repository }}:latest
|
|
80
|
+
cache-from: type=gha
|
|
81
|
+
cache-to: type=gha,mode=max
|
|
82
|
+
- language: yaml
|
|
83
|
+
label: "CORRECT — single platform with GHA cache (still needs buildx)"
|
|
84
|
+
code: |
|
|
85
|
+
steps:
|
|
86
|
+
- uses: actions/checkout@v4
|
|
87
|
+
- uses: docker/setup-buildx-action@v3
|
|
88
|
+
- uses: docker/build-push-action@v6
|
|
89
|
+
with:
|
|
90
|
+
context: .
|
|
91
|
+
push: false
|
|
92
|
+
load: true
|
|
93
|
+
tags: myapp:test
|
|
94
|
+
cache-from: type=gha
|
|
95
|
+
cache-to: type=gha,mode=max
|
|
96
|
+
prevention:
|
|
97
|
+
- "Always add `docker/setup-buildx-action@v3` as a step before any `docker buildx` or `docker/build-push-action` usage."
|
|
98
|
+
- "Use `docker/build-push-action` instead of raw `docker build` for all CI image builds — it handles BuildKit setup and caching correctly."
|
|
99
|
+
- "For ARM64/multi-arch builds, expect 3-5x longer build times on x86 runners due to QEMU emulation."
|
|
100
|
+
docs:
|
|
101
|
+
- url: "https://docs.docker.com/build/ci/github-actions/"
|
|
102
|
+
label: "Docker Build in GitHub Actions (Docker docs)"
|
|
103
|
+
- url: "https://github.com/docker/setup-buildx-action"
|
|
104
|
+
label: "docker/setup-buildx-action"
|
|
105
|
+
- url: "https://github.com/docker/build-push-action"
|
|
106
|
+
label: "docker/build-push-action"
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
id: runner-environment-011
|
|
2
|
+
title: "macOS Runner Homebrew Binaries Not on PATH After brew install"
|
|
3
|
+
category: runner-environment
|
|
4
|
+
severity: error
|
|
5
|
+
tags:
|
|
6
|
+
- macos
|
|
7
|
+
- homebrew
|
|
8
|
+
- PATH
|
|
9
|
+
- runner
|
|
10
|
+
- shell
|
|
11
|
+
- binary
|
|
12
|
+
patterns:
|
|
13
|
+
- regex: "command not found.*brew"
|
|
14
|
+
flags: "i"
|
|
15
|
+
- regex: "brew: command not found"
|
|
16
|
+
flags: "i"
|
|
17
|
+
- regex: "/opt/homebrew/bin.*not found"
|
|
18
|
+
flags: "i"
|
|
19
|
+
- regex: "zsh: command not found"
|
|
20
|
+
flags: "i"
|
|
21
|
+
error_messages:
|
|
22
|
+
- "zsh: command not found: <tool>"
|
|
23
|
+
- "Error: Process completed with exit code 127."
|
|
24
|
+
- "/usr/bin/env: '<tool>': No such file or directory"
|
|
25
|
+
root_cause: |
|
|
26
|
+
GitHub Actions macOS runners (including `macos-14` and `macos-15` on Apple Silicon)
|
|
27
|
+
use zsh as the default shell. Homebrew installs binaries to `/opt/homebrew/bin` on
|
|
28
|
+
Apple Silicon (`macos-14`+) and `/usr/local/bin` on Intel (`macos-13`), but these
|
|
29
|
+
paths are not always added to `$PATH` for subsequent steps automatically.
|
|
30
|
+
|
|
31
|
+
When a step runs `brew install sometool` and then a **later step** attempts to use
|
|
32
|
+
`sometool`, the binary may not be on `$PATH` because Homebrew's shellenv was never
|
|
33
|
+
sourced into the Actions runner's shell environment.
|
|
34
|
+
|
|
35
|
+
Additionally, `macos-14` moved to Apple Silicon, changing the Homebrew prefix from
|
|
36
|
+
`/usr/local` to `/opt/homebrew`, which breaks hardcoded path assumptions in scripts
|
|
37
|
+
that worked on `macos-13`.
|
|
38
|
+
fix: |
|
|
39
|
+
After installing with Homebrew, explicitly add the binary path to `$GITHUB_PATH`
|
|
40
|
+
(which persists across subsequent steps in the same job). Alternatively, use
|
|
41
|
+
`brew --prefix` to get the correct path regardless of architecture.
|
|
42
|
+
fix_code:
|
|
43
|
+
- language: yaml
|
|
44
|
+
label: "WRONG — tool installed but not accessible in next step"
|
|
45
|
+
code: |
|
|
46
|
+
jobs:
|
|
47
|
+
build:
|
|
48
|
+
runs-on: macos-latest
|
|
49
|
+
steps:
|
|
50
|
+
- name: Install tool
|
|
51
|
+
run: brew install sometool
|
|
52
|
+
|
|
53
|
+
- name: Use tool
|
|
54
|
+
run: sometool --version # Error: zsh: command not found: sometool
|
|
55
|
+
- language: yaml
|
|
56
|
+
label: "CORRECT — add brew prefix to GITHUB_PATH"
|
|
57
|
+
code: |
|
|
58
|
+
jobs:
|
|
59
|
+
build:
|
|
60
|
+
runs-on: macos-latest
|
|
61
|
+
steps:
|
|
62
|
+
- name: Install tool
|
|
63
|
+
run: |
|
|
64
|
+
brew install sometool
|
|
65
|
+
# Add homebrew bin to path for all subsequent steps
|
|
66
|
+
echo "$(brew --prefix)/bin" >> $GITHUB_PATH
|
|
67
|
+
|
|
68
|
+
- name: Use tool
|
|
69
|
+
run: sometool --version # works
|
|
70
|
+
- language: yaml
|
|
71
|
+
label: "CORRECT — source shellenv in a single step"
|
|
72
|
+
code: |
|
|
73
|
+
jobs:
|
|
74
|
+
build:
|
|
75
|
+
runs-on: macos-latest
|
|
76
|
+
steps:
|
|
77
|
+
- name: Install and run in same step
|
|
78
|
+
run: |
|
|
79
|
+
brew install sometool
|
|
80
|
+
eval "$(brew shellenv)"
|
|
81
|
+
sometool --version
|
|
82
|
+
prevention:
|
|
83
|
+
- "After `brew install`, append `$(brew --prefix)/bin` to `$GITHUB_PATH` to persist it across steps."
|
|
84
|
+
- "Use `brew --prefix <formula>` to get formula-specific paths rather than hardcoding `/usr/local` or `/opt/homebrew`."
|
|
85
|
+
- "When upgrading from `macos-13` to `macos-14`+, audit any hardcoded `/usr/local` paths for the Homebrew prefix change."
|
|
86
|
+
docs:
|
|
87
|
+
- url: "https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#adding-a-system-path"
|
|
88
|
+
label: "Adding a system path (GITHUB_PATH)"
|
|
89
|
+
- url: "https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources"
|
|
90
|
+
label: "GitHub-hosted runners — supported environments"
|
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
id: runner-environment-009
|
|
2
|
-
title: "Node.js Runtime Deprecation"
|
|
3
|
-
category: runner-environment
|
|
4
|
-
severity: warning
|
|
5
|
-
tags:
|
|
6
|
-
- node
|
|
7
|
-
- runtime
|
|
8
|
-
- deprecation
|
|
9
|
-
- marketplace-actions
|
|
10
|
-
- compatibility
|
|
11
|
-
patterns:
|
|
12
|
-
- regex: "Node\\.js 16 actions are deprecated"
|
|
13
|
-
flags: "i"
|
|
14
|
-
- regex: "Please update the following actions to use Node\\.js 20"
|
|
15
|
-
flags: "i"
|
|
16
|
-
- regex: "runs using Node 16 are deprecated"
|
|
17
|
-
flags: "i"
|
|
18
|
-
error_messages:
|
|
19
|
-
- "Node.js 16 actions are deprecated."
|
|
20
|
-
- "Please update the following actions to use Node.js 20."
|
|
21
|
-
root_cause: |
|
|
22
|
-
Some marketplace actions bundle a Node.js runtime. When GitHub deprecates an older
|
|
23
|
-
runtime such as Node 16, workflows can start emitting warnings or eventually fail if the
|
|
24
|
-
referenced action version has not been updated.
|
|
25
|
-
|
|
26
|
-
This is usually caused by pinning an old major version of an action long after the runner
|
|
27
|
-
platform has moved on.
|
|
28
|
-
fix: |
|
|
29
|
-
Upgrade the affected action to a maintained version that uses the current supported Node
|
|
30
|
-
runtime. Review pinned SHAs and major versions for checkout, setup, artifact, and cache
|
|
31
|
-
actions first because they are common sources of these warnings.
|
|
32
|
-
fix_code:
|
|
33
|
-
- language: yaml
|
|
34
|
-
label: "Upgrade action versions to Node 20-compatible releases"
|
|
35
|
-
code: |
|
|
36
|
-
steps:
|
|
37
|
-
- uses: actions/checkout@v4
|
|
38
|
-
- uses: actions/setup-node@v4
|
|
39
|
-
with:
|
|
40
|
-
node-version: 20
|
|
41
|
-
- uses: actions/upload-artifact@v4
|
|
42
|
-
with:
|
|
43
|
-
name: build-output
|
|
44
|
-
path: dist/
|
|
45
|
-
prevention:
|
|
46
|
-
- "Review GitHub Actions deprecation notices and keep marketplace action versions current."
|
|
47
|
-
- "Prefer supported major versions from official `actions/*` repositories."
|
|
48
|
-
- "Audit pinned SHAs periodically so old runtimes do not linger unnoticed."
|
|
49
|
-
docs:
|
|
50
|
-
- url: "https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runs-for-javascript-actions"
|
|
51
|
-
label: "JavaScript action runtime metadata"
|
|
52
|
-
- url: "https://docs.github.com/en/actions/automating-your-workflow-with-github-actions/metadata-syntax-for-github-actions"
|
|
53
|
-
label: "Metadata syntax for GitHub Actions"
|
|
54
|
-
source:
|
|
55
|
-
article: "https://htek.dev/articles/github-actions-debugging-guide"
|
|
56
|
-
section: "Node runtime deprecation warnings"
|
|
1
|
+
id: runner-environment-009
|
|
2
|
+
title: "Node.js Runtime Deprecation"
|
|
3
|
+
category: runner-environment
|
|
4
|
+
severity: warning
|
|
5
|
+
tags:
|
|
6
|
+
- node
|
|
7
|
+
- runtime
|
|
8
|
+
- deprecation
|
|
9
|
+
- marketplace-actions
|
|
10
|
+
- compatibility
|
|
11
|
+
patterns:
|
|
12
|
+
- regex: "Node\\.js 16 actions are deprecated"
|
|
13
|
+
flags: "i"
|
|
14
|
+
- regex: "Please update the following actions to use Node\\.js 20"
|
|
15
|
+
flags: "i"
|
|
16
|
+
- regex: "runs using Node 16 are deprecated"
|
|
17
|
+
flags: "i"
|
|
18
|
+
error_messages:
|
|
19
|
+
- "Node.js 16 actions are deprecated."
|
|
20
|
+
- "Please update the following actions to use Node.js 20."
|
|
21
|
+
root_cause: |
|
|
22
|
+
Some marketplace actions bundle a Node.js runtime. When GitHub deprecates an older
|
|
23
|
+
runtime such as Node 16, workflows can start emitting warnings or eventually fail if the
|
|
24
|
+
referenced action version has not been updated.
|
|
25
|
+
|
|
26
|
+
This is usually caused by pinning an old major version of an action long after the runner
|
|
27
|
+
platform has moved on.
|
|
28
|
+
fix: |
|
|
29
|
+
Upgrade the affected action to a maintained version that uses the current supported Node
|
|
30
|
+
runtime. Review pinned SHAs and major versions for checkout, setup, artifact, and cache
|
|
31
|
+
actions first because they are common sources of these warnings.
|
|
32
|
+
fix_code:
|
|
33
|
+
- language: yaml
|
|
34
|
+
label: "Upgrade action versions to Node 20-compatible releases"
|
|
35
|
+
code: |
|
|
36
|
+
steps:
|
|
37
|
+
- uses: actions/checkout@v4
|
|
38
|
+
- uses: actions/setup-node@v4
|
|
39
|
+
with:
|
|
40
|
+
node-version: 20
|
|
41
|
+
- uses: actions/upload-artifact@v4
|
|
42
|
+
with:
|
|
43
|
+
name: build-output
|
|
44
|
+
path: dist/
|
|
45
|
+
prevention:
|
|
46
|
+
- "Review GitHub Actions deprecation notices and keep marketplace action versions current."
|
|
47
|
+
- "Prefer supported major versions from official `actions/*` repositories."
|
|
48
|
+
- "Audit pinned SHAs periodically so old runtimes do not linger unnoticed."
|
|
49
|
+
docs:
|
|
50
|
+
- url: "https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runs-for-javascript-actions"
|
|
51
|
+
label: "JavaScript action runtime metadata"
|
|
52
|
+
- url: "https://docs.github.com/en/actions/automating-your-workflow-with-github-actions/metadata-syntax-for-github-actions"
|
|
53
|
+
label: "Metadata syntax for GitHub Actions"
|
|
54
|
+
source:
|
|
55
|
+
article: "https://htek.dev/articles/github-actions-debugging-guide"
|
|
56
|
+
section: "Node runtime deprecation warnings"
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
id: runner-environment-016
|
|
2
|
+
title: "Node 20 → Node 24 Forced Migration Breaks Actions and macOS 13 Runners"
|
|
3
|
+
category: runner-environment
|
|
4
|
+
severity: error
|
|
5
|
+
tags:
|
|
6
|
+
- node
|
|
7
|
+
- node24
|
|
8
|
+
- deprecation
|
|
9
|
+
- macos
|
|
10
|
+
- arm32
|
|
11
|
+
- runtime-migration
|
|
12
|
+
patterns:
|
|
13
|
+
- regex: "Node\\.?20 actions are deprecated"
|
|
14
|
+
flags: "i"
|
|
15
|
+
- regex: "Please update the following actions to use Node\\.?24"
|
|
16
|
+
flags: "i"
|
|
17
|
+
- regex: "node20 is deprecated"
|
|
18
|
+
flags: "i"
|
|
19
|
+
- regex: "macOS 13.*not supported.*Node 24"
|
|
20
|
+
flags: "i"
|
|
21
|
+
- regex: "ARM32.*no longer supported"
|
|
22
|
+
flags: "i"
|
|
23
|
+
error_messages:
|
|
24
|
+
- "Node.js 20 actions are deprecated. Please update the following actions to use Node.js 24."
|
|
25
|
+
- "node20 is deprecated and will be disabled in a future runner release."
|
|
26
|
+
- "Error: This action requires Node.js 24 or higher. Current version: 20."
|
|
27
|
+
root_cause: |
|
|
28
|
+
GitHub announced deprecation of Node 20 on Actions runners on September 19, 2025
|
|
29
|
+
(editor updated May 19, 2026: migration date confirmed June 16, 2026). Starting
|
|
30
|
+
June 16, 2026, all GitHub-hosted runners default to Node 24.
|
|
31
|
+
|
|
32
|
+
Three distinct breakage scenarios exist:
|
|
33
|
+
|
|
34
|
+
1. **Marketplace actions using `runs.using: 'node20'`** — any third-party or custom
|
|
35
|
+
action that declares `runs.using: node20` in its `action.yml` will emit deprecation
|
|
36
|
+
warnings and eventually fail when GitHub removes Node 20 from runners later in 2026.
|
|
37
|
+
|
|
38
|
+
2. **macOS 13 (and older) runners are incompatible with Node 24** — Node 24 dropped
|
|
39
|
+
support for macOS 13.4 and lower. Workflows specifying `runs-on: macos-13` (or older
|
|
40
|
+
images) fail at the runner startup phase or produce unexpected errors from the
|
|
41
|
+
Node-based runner bootstrapper.
|
|
42
|
+
|
|
43
|
+
3. **ARM32 self-hosted runners** — Node 24 has no official ARM32 support. Self-hosted
|
|
44
|
+
runners on ARM32 hardware silently lose the ability to execute Node-based actions
|
|
45
|
+
after the Node 20 removal milestone.
|
|
46
|
+
fix: |
|
|
47
|
+
**For action authors:** Update `action.yml` to declare `runs.using: 'node24'` and
|
|
48
|
+
test locally with Node 24. Publish a new release so downstream consumers pick it up.
|
|
49
|
+
|
|
50
|
+
**For workflow authors:**
|
|
51
|
+
- Upgrade all `uses:` pins to the latest major version that ships with Node 24 support
|
|
52
|
+
(e.g. `actions/checkout@v4 → @v4` already Node-24-ready; `actions/setup-node@v4`
|
|
53
|
+
already Node-24-ready).
|
|
54
|
+
- Replace `runs-on: macos-13` with `runs-on: macos-latest` or `macos-14+`.
|
|
55
|
+
- For ARM32 self-hosted runners: migrate to ARM64 hardware or use container-based
|
|
56
|
+
execution that bundles its own Node runtime.
|
|
57
|
+
|
|
58
|
+
**Temporary escape hatch (not for production long-term):**
|
|
59
|
+
Set `ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true` in the workflow `env` block to
|
|
60
|
+
continue using Node 20 until GitHub removes it from runners later in 2026.
|
|
61
|
+
fix_code:
|
|
62
|
+
- language: yaml
|
|
63
|
+
label: "Upgrade pinned action versions to Node 24-compatible releases"
|
|
64
|
+
code: |
|
|
65
|
+
steps:
|
|
66
|
+
# Pin to latest major — all official actions already ship Node 24 builds
|
|
67
|
+
- uses: actions/checkout@v4
|
|
68
|
+
- uses: actions/setup-node@v4
|
|
69
|
+
with:
|
|
70
|
+
node-version: '20'
|
|
71
|
+
- uses: actions/upload-artifact@v4
|
|
72
|
+
with:
|
|
73
|
+
name: dist
|
|
74
|
+
path: dist/
|
|
75
|
+
- language: yaml
|
|
76
|
+
label: "Migrate macOS runner from macos-13 to macos-latest"
|
|
77
|
+
code: |
|
|
78
|
+
jobs:
|
|
79
|
+
build:
|
|
80
|
+
# macos-13 is incompatible with Node 24 — use macos-latest (14+)
|
|
81
|
+
runs-on: macos-latest
|
|
82
|
+
steps:
|
|
83
|
+
- uses: actions/checkout@v4
|
|
84
|
+
- language: yaml
|
|
85
|
+
label: "Temporary escape hatch — keep Node 20 until explicit removal"
|
|
86
|
+
code: |
|
|
87
|
+
jobs:
|
|
88
|
+
build:
|
|
89
|
+
runs-on: ubuntu-latest
|
|
90
|
+
env:
|
|
91
|
+
# WARNING: temporary only — Node 20 will be fully removed later in 2026
|
|
92
|
+
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: 'true'
|
|
93
|
+
steps:
|
|
94
|
+
- uses: actions/checkout@v4
|
|
95
|
+
- language: yaml
|
|
96
|
+
label: "Test Node 24 compatibility before the mandatory cutover"
|
|
97
|
+
code: |
|
|
98
|
+
jobs:
|
|
99
|
+
build:
|
|
100
|
+
runs-on: ubuntu-latest
|
|
101
|
+
env:
|
|
102
|
+
# Force Node 24 to test compatibility ahead of the June 16 cutover
|
|
103
|
+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: 'true'
|
|
104
|
+
steps:
|
|
105
|
+
- uses: actions/checkout@v4
|
|
106
|
+
prevention:
|
|
107
|
+
- "Subscribe to GitHub changelog https://github.blog/changelog/label/actions/ for deprecation notices."
|
|
108
|
+
- "Run `FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true` in CI to catch Node 24 incompatibilities early."
|
|
109
|
+
- "Avoid pinning to old major versions of `actions/*` — use floating major tags (e.g. @v4)."
|
|
110
|
+
- "Audit custom/internal actions for `runs.using: node20` declarations before the June 16, 2026 migration date."
|
|
111
|
+
- "Migrate macOS CI to macos-14 or macos-latest to ensure Node 24 compatibility."
|
|
112
|
+
docs:
|
|
113
|
+
- url: "https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/"
|
|
114
|
+
label: "GitHub Changelog: Deprecation of Node 20 on GitHub Actions runners"
|
|
115
|
+
- url: "https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runs-for-javascript-actions"
|
|
116
|
+
label: "Metadata syntax: runs.using for JavaScript actions"
|
|
117
|
+
- url: "https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources"
|
|
118
|
+
label: "Supported runners and hardware resources"
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
id: runner-environment-015
|
|
2
|
+
title: "npm ci Fails with Lockfile Mismatch or Missing package-lock.json"
|
|
3
|
+
category: runner-environment
|
|
4
|
+
severity: error
|
|
5
|
+
tags:
|
|
6
|
+
- npm
|
|
7
|
+
- npm-ci
|
|
8
|
+
- lockfile
|
|
9
|
+
- package-lock.json
|
|
10
|
+
- dependencies
|
|
11
|
+
- node
|
|
12
|
+
- reproducible
|
|
13
|
+
patterns:
|
|
14
|
+
- regex: "npm ci.*can only install.*package-lock\\.json"
|
|
15
|
+
flags: "i"
|
|
16
|
+
- regex: "Missing script.*ci"
|
|
17
|
+
flags: "i"
|
|
18
|
+
- regex: "npm ERR! code EUSAGE"
|
|
19
|
+
flags: "i"
|
|
20
|
+
- regex: "npm warn saveError ENOENT.*package-lock\\.json"
|
|
21
|
+
flags: "i"
|
|
22
|
+
- regex: "npm ERR!.*lock file.*older npm"
|
|
23
|
+
flags: "i"
|
|
24
|
+
- regex: "EBADENGINE"
|
|
25
|
+
flags: "i"
|
|
26
|
+
error_messages:
|
|
27
|
+
- "npm error The `npm ci` command can only install with an existing package-lock.json"
|
|
28
|
+
- "npm warn saveError ENOENT: no such file or directory, open '/home/runner/work/.../package-lock.json'"
|
|
29
|
+
- "npm error `npm ci` can only install packages when your package.json and package-lock.json are in sync."
|
|
30
|
+
- "npm error Missing: <package>@<version> from lock file"
|
|
31
|
+
root_cause: |
|
|
32
|
+
`npm ci` is strict by design — it requires `package-lock.json` to be present and
|
|
33
|
+
exactly in sync with `package.json`. It fails in several common CI scenarios:
|
|
34
|
+
|
|
35
|
+
1. **No lockfile committed** — developers add `package-lock.json` to `.gitignore`
|
|
36
|
+
(common in library repos) — `npm ci` refuses to run.
|
|
37
|
+
|
|
38
|
+
2. **Lockfile out of sync** — a developer ran `npm install` locally which updated
|
|
39
|
+
the lockfile, but committed `package.json` without the updated lockfile, or vice versa.
|
|
40
|
+
`npm ci` reports "Missing: package@version from lock file."
|
|
41
|
+
|
|
42
|
+
3. **Lockfile from incompatible npm version** — npm v6 lockfiles (lockfileVersion 1)
|
|
43
|
+
cannot be used with `npm ci` in npm v7+ projects that use workspaces, and vice versa.
|
|
44
|
+
|
|
45
|
+
4. **Monorepo workspace packages not locked** — `package-lock.json` at root does not
|
|
46
|
+
lock workspace packages listed in `packages/*` if each sub-package has its own
|
|
47
|
+
`package.json` without being part of the root workspaces config.
|
|
48
|
+
fix: |
|
|
49
|
+
Commit `package-lock.json` to the repository (do not gitignore it in apps). Keep
|
|
50
|
+
`package.json` and `package-lock.json` in sync by running `npm install` locally
|
|
51
|
+
after any manifest change and committing both files together.
|
|
52
|
+
fix_code:
|
|
53
|
+
- language: yaml
|
|
54
|
+
label: "CORRECT — npm ci with Node version matrix and lockfile caching"
|
|
55
|
+
code: |
|
|
56
|
+
jobs:
|
|
57
|
+
test:
|
|
58
|
+
runs-on: ubuntu-latest
|
|
59
|
+
strategy:
|
|
60
|
+
matrix:
|
|
61
|
+
node-version: ['18.x', '20.x']
|
|
62
|
+
steps:
|
|
63
|
+
- uses: actions/checkout@v4
|
|
64
|
+
|
|
65
|
+
- uses: actions/setup-node@v4
|
|
66
|
+
with:
|
|
67
|
+
node-version: ${{ matrix.node-version }}
|
|
68
|
+
cache: npm # caches ~/.npm using package-lock.json hash
|
|
69
|
+
|
|
70
|
+
- name: Install dependencies
|
|
71
|
+
run: npm ci # fails fast if lockfile is out of sync
|
|
72
|
+
|
|
73
|
+
- name: Run tests
|
|
74
|
+
run: npm test
|
|
75
|
+
- language: yaml
|
|
76
|
+
label: "Detect lockfile sync issues before CI"
|
|
77
|
+
code: |
|
|
78
|
+
steps:
|
|
79
|
+
- uses: actions/checkout@v4
|
|
80
|
+
- uses: actions/setup-node@v4
|
|
81
|
+
with:
|
|
82
|
+
node-version: 20
|
|
83
|
+
|
|
84
|
+
- name: Verify lockfile is up to date
|
|
85
|
+
run: |
|
|
86
|
+
npm install --package-lock-only
|
|
87
|
+
git diff --exit-code package-lock.json || {
|
|
88
|
+
echo "::error::package-lock.json is out of sync with package.json"
|
|
89
|
+
echo "Run 'npm install' locally and commit the updated lockfile"
|
|
90
|
+
exit 1
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
- run: npm ci
|
|
94
|
+
- language: bash
|
|
95
|
+
label: "Fix gitignore — ensure lockfile is tracked"
|
|
96
|
+
code: |
|
|
97
|
+
# If package-lock.json is gitignored, remove it from .gitignore
|
|
98
|
+
grep -v "package-lock.json" .gitignore > .gitignore.tmp && mv .gitignore.tmp .gitignore
|
|
99
|
+
git add package-lock.json
|
|
100
|
+
git commit -m "chore: track package-lock.json for reproducible CI"
|
|
101
|
+
prevention:
|
|
102
|
+
- "Always commit `package-lock.json` to git — never gitignore it in application repos."
|
|
103
|
+
- "Run `npm install` (not just `npm ci`) locally after any `package.json` change and commit both files atomically."
|
|
104
|
+
- "Add a `Verify lockfile` step to CI that runs `npm install --package-lock-only && git diff --exit-code package-lock.json` to catch drift early."
|
|
105
|
+
- "Renovate Bot and Dependabot automatically keep lockfiles in sync when configured correctly."
|
|
106
|
+
docs:
|
|
107
|
+
- url: "https://docs.npmjs.com/cli/v10/commands/npm-ci"
|
|
108
|
+
label: "npm ci (npmjs docs)"
|
|
109
|
+
- url: "https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#caching-npm-packages"
|
|
110
|
+
label: "Caching npm packages"
|
|
111
|
+
- url: "https://github.com/actions/setup-node#caching-global-packages-data"
|
|
112
|
+
label: "actions/setup-node — npm caching"
|