@htekdev/actions-debugger 1.0.65 → 1.0.66
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/runner-environment/ubuntu-24-docker-compose-v1-removed.yml +95 -0
- package/errors/runner-environment/ubuntu-24-gcc-default-version-upgrade.yml +113 -0
- package/errors/runner-environment/ubuntu-24-netstat-net-tools-not-installed.yml +99 -0
- package/errors/runner-environment/ubuntu-apt-key-deprecated-no-pubkey.yml +110 -0
- package/package.json +1 -1
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
id: runner-environment-125
|
|
2
|
+
title: "ubuntu-22.04/24.04 Runners: docker-compose (v1) Binary Removed — Use docker compose v2"
|
|
3
|
+
category: runner-environment
|
|
4
|
+
severity: error
|
|
5
|
+
tags:
|
|
6
|
+
- docker
|
|
7
|
+
- docker-compose
|
|
8
|
+
- ubuntu-22
|
|
9
|
+
- ubuntu-24
|
|
10
|
+
- compose-v2
|
|
11
|
+
- breaking-change
|
|
12
|
+
patterns:
|
|
13
|
+
- regex: 'docker-compose:\s*(command not found|not found)'
|
|
14
|
+
flags: 'i'
|
|
15
|
+
- regex: '/usr/bin/docker-compose:\s*No such file or directory'
|
|
16
|
+
flags: 'i'
|
|
17
|
+
- regex: 'exec\s+"docker-compose":\s*executable file not found'
|
|
18
|
+
flags: 'i'
|
|
19
|
+
error_messages:
|
|
20
|
+
- "docker-compose: command not found"
|
|
21
|
+
- "/usr/bin/docker-compose: No such file or directory"
|
|
22
|
+
- "exec: \"docker-compose\": executable file not found in $PATH"
|
|
23
|
+
- "OCI runtime exec failed: exec: \"docker-compose\": executable file not found"
|
|
24
|
+
root_cause: |
|
|
25
|
+
The standalone `docker-compose` v1 binary (Python-based) was removed from GitHub-hosted
|
|
26
|
+
ubuntu-22.04 and ubuntu-24.04 runner images. Only the Docker Compose v2 plugin is
|
|
27
|
+
available, invoked as `docker compose` (space, not hyphen) as a Docker CLI subcommand.
|
|
28
|
+
|
|
29
|
+
The docker-compose v1 project reached end-of-life in July 2023. GitHub Actions runner
|
|
30
|
+
images on ubuntu-22.04 removed it during the ubuntu-22.04 image update cycle. Ubuntu 24.04
|
|
31
|
+
runners never included v1.
|
|
32
|
+
|
|
33
|
+
Workflows that use `docker-compose up`, `docker-compose build`, `docker-compose down`, or
|
|
34
|
+
any `docker-compose` subcommand with the hyphenated binary name will fail immediately with
|
|
35
|
+
"command not found". This often surfaces in scripts that run in `run:` steps or in shell
|
|
36
|
+
scripts checked into the repo.
|
|
37
|
+
|
|
38
|
+
The Docker Compose v2 plugin (`docker compose`) is a drop-in replacement for most
|
|
39
|
+
workflows, but it is invoked differently and has subtle behavior differences around
|
|
40
|
+
compatibility modes, exit codes on dependent service failures, and environment variable
|
|
41
|
+
interpolation.
|
|
42
|
+
fix: |
|
|
43
|
+
Replace all calls to `docker-compose` (hyphen) with `docker compose` (space). The v2
|
|
44
|
+
plugin is pre-installed on all current GitHub-hosted runners as a Docker CLI plugin.
|
|
45
|
+
If you need to support both old and new syntax in scripts, add a shell alias or wrapper.
|
|
46
|
+
fix_code:
|
|
47
|
+
- language: yaml
|
|
48
|
+
label: "Replace docker-compose (v1) with docker compose (v2)"
|
|
49
|
+
code: |
|
|
50
|
+
jobs:
|
|
51
|
+
test:
|
|
52
|
+
runs-on: ubuntu-latest
|
|
53
|
+
steps:
|
|
54
|
+
- uses: actions/checkout@v4
|
|
55
|
+
|
|
56
|
+
# ❌ v1 syntax — docker-compose binary no longer exists
|
|
57
|
+
# - run: docker-compose up -d
|
|
58
|
+
# - run: docker-compose build
|
|
59
|
+
# - run: docker-compose down
|
|
60
|
+
|
|
61
|
+
# ✅ v2 syntax — docker compose plugin (pre-installed)
|
|
62
|
+
- name: Start services
|
|
63
|
+
run: docker compose up -d
|
|
64
|
+
|
|
65
|
+
- name: Run tests
|
|
66
|
+
run: docker compose run --rm app npm test
|
|
67
|
+
|
|
68
|
+
- name: Teardown
|
|
69
|
+
run: docker compose down --volumes
|
|
70
|
+
- language: yaml
|
|
71
|
+
label: "Script-based fallback for repos with shell scripts using old syntax"
|
|
72
|
+
code: |
|
|
73
|
+
jobs:
|
|
74
|
+
test:
|
|
75
|
+
runs-on: ubuntu-latest
|
|
76
|
+
steps:
|
|
77
|
+
- uses: actions/checkout@v4
|
|
78
|
+
# Create a shim so legacy scripts work without editing every file
|
|
79
|
+
- name: Create docker-compose shim
|
|
80
|
+
run: |
|
|
81
|
+
sudo ln -s /usr/libexec/docker/cli-plugins/docker-compose \
|
|
82
|
+
/usr/local/bin/docker-compose
|
|
83
|
+
- run: ./scripts/integration-test.sh
|
|
84
|
+
prevention:
|
|
85
|
+
- "Audit all workflow files and shell scripts for `docker-compose` (hyphen) and replace with `docker compose` (space)"
|
|
86
|
+
- "Pin `docker compose version` in a setup step to document the expected Compose version"
|
|
87
|
+
- "When migrating repos, search for the pattern in Makefiles, shell scripts, and docker-compose.yml files — not just .github/workflows/"
|
|
88
|
+
- "The v2 plugin is at /usr/libexec/docker/cli-plugins/docker-compose if a shim is needed for legacy scripts"
|
|
89
|
+
docs:
|
|
90
|
+
- url: "https://docs.docker.com/compose/migrate/"
|
|
91
|
+
label: "Docker Docs: Migrate to Compose v2"
|
|
92
|
+
- url: "https://github.com/docker/compose/releases/tag/v2.0.0"
|
|
93
|
+
label: "Docker Compose v2.0.0 release (GA plugin replacing standalone binary)"
|
|
94
|
+
- url: "https://github.com/actions/runner-images/issues/6325"
|
|
95
|
+
label: "runner-images GitHub Issue: docker-compose v1 removal from ubuntu-22.04"
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
id: runner-environment-127
|
|
2
|
+
title: "ubuntu-24.04 Runner: GCC 13 Default Breaks Workflows Hardcoding gcc-12 or gcc-11"
|
|
3
|
+
category: runner-environment
|
|
4
|
+
severity: error
|
|
5
|
+
tags:
|
|
6
|
+
- ubuntu-24
|
|
7
|
+
- gcc
|
|
8
|
+
- compiler
|
|
9
|
+
- c-cpp
|
|
10
|
+
- breaking-change
|
|
11
|
+
- runner-image
|
|
12
|
+
patterns:
|
|
13
|
+
- regex: 'gcc-1[012]:\s*(command not found|not found)'
|
|
14
|
+
flags: 'i'
|
|
15
|
+
- regex: '/usr/bin/gcc-1[012]:\s*No such file or directory'
|
|
16
|
+
flags: 'i'
|
|
17
|
+
- regex: 'update-alternatives.*gcc.*no alternatives'
|
|
18
|
+
flags: 'i'
|
|
19
|
+
- regex: 'gcc: error: unrecognized command-line option.*std=c\+\+20'
|
|
20
|
+
flags: 'i'
|
|
21
|
+
error_messages:
|
|
22
|
+
- "gcc-12: command not found"
|
|
23
|
+
- "gcc-11: command not found"
|
|
24
|
+
- "/usr/bin/gcc-12: No such file or directory"
|
|
25
|
+
- "g++-12: command not found"
|
|
26
|
+
- "cc1plus: error: unrecognized command line option"
|
|
27
|
+
root_cause: |
|
|
28
|
+
Ubuntu 24.04 (Noble Numbat) ships GCC 13 as its default and only pre-installed compiler
|
|
29
|
+
version. The ubuntu-24.04 GitHub-hosted runner image follows this: `gcc` and `g++` point
|
|
30
|
+
to GCC 13, and older versions (`gcc-12`, `gcc-11`, `gcc-10`) are not installed by default.
|
|
31
|
+
|
|
32
|
+
Workflows that hardcode a specific compiler version — `gcc-12`, `g++-12`, `gcc-11`, or
|
|
33
|
+
set `CC=gcc-12` / `CXX=g++-12` in environment variables — will fail immediately with
|
|
34
|
+
"command not found" when the runner image is ubuntu-24.04.
|
|
35
|
+
|
|
36
|
+
This commonly breaks:
|
|
37
|
+
- C/C++ projects that pin a specific GCC version for ABI stability or reproducibility
|
|
38
|
+
- CMake projects with `CMAKE_C_COMPILER=gcc-12` in toolchain files or workflow env vars
|
|
39
|
+
- Projects testing against specific GCC versions using a matrix
|
|
40
|
+
- Makefile-based builds with `CC := gcc-12` hard-coded
|
|
41
|
+
|
|
42
|
+
GCC 13 has improved standards compliance, stricter warnings-as-errors behavior, and
|
|
43
|
+
changed default `-std` values for C and C++. Code that compiled cleanly on GCC 12 may
|
|
44
|
+
emit new warnings or errors on GCC 13 even after installing the right package.
|
|
45
|
+
fix: |
|
|
46
|
+
Update compiler references to use GCC 13 on ubuntu-24.04, or install the specific GCC
|
|
47
|
+
version needed via apt before building. For multi-version testing, use a runner matrix
|
|
48
|
+
pairing the Ubuntu version with the GCC version.
|
|
49
|
+
fix_code:
|
|
50
|
+
- language: yaml
|
|
51
|
+
label: "Update to GCC 13 on ubuntu-24.04 or install older version"
|
|
52
|
+
code: |
|
|
53
|
+
jobs:
|
|
54
|
+
build:
|
|
55
|
+
runs-on: ubuntu-latest
|
|
56
|
+
steps:
|
|
57
|
+
- uses: actions/checkout@v4
|
|
58
|
+
|
|
59
|
+
# ❌ GCC 12 not pre-installed on ubuntu-24.04
|
|
60
|
+
# env:
|
|
61
|
+
# CC: gcc-12
|
|
62
|
+
# CXX: g++-12
|
|
63
|
+
|
|
64
|
+
# ✅ Option 1: use the default GCC 13 on ubuntu-24.04
|
|
65
|
+
- name: Build with GCC 13 (default on ubuntu-24.04)
|
|
66
|
+
env:
|
|
67
|
+
CC: gcc
|
|
68
|
+
CXX: g++
|
|
69
|
+
run: make -j$(nproc)
|
|
70
|
+
|
|
71
|
+
# ✅ Option 2: install a specific GCC version
|
|
72
|
+
- name: Install GCC 12
|
|
73
|
+
run: sudo apt-get install -y gcc-12 g++-12
|
|
74
|
+
|
|
75
|
+
- name: Build with GCC 12
|
|
76
|
+
env:
|
|
77
|
+
CC: gcc-12
|
|
78
|
+
CXX: g++-12
|
|
79
|
+
run: make -j$(nproc)
|
|
80
|
+
- language: yaml
|
|
81
|
+
label: "Matrix strategy to test multiple GCC versions across Ubuntu versions"
|
|
82
|
+
code: |
|
|
83
|
+
jobs:
|
|
84
|
+
build:
|
|
85
|
+
strategy:
|
|
86
|
+
matrix:
|
|
87
|
+
include:
|
|
88
|
+
- os: ubuntu-22.04
|
|
89
|
+
gcc: '12'
|
|
90
|
+
- os: ubuntu-24.04
|
|
91
|
+
gcc: '13'
|
|
92
|
+
runs-on: ${{ matrix.os }}
|
|
93
|
+
steps:
|
|
94
|
+
- uses: actions/checkout@v4
|
|
95
|
+
- name: Install GCC ${{ matrix.gcc }}
|
|
96
|
+
run: sudo apt-get install -y gcc-${{ matrix.gcc }} g++-${{ matrix.gcc }}
|
|
97
|
+
- name: Build
|
|
98
|
+
env:
|
|
99
|
+
CC: gcc-${{ matrix.gcc }}
|
|
100
|
+
CXX: g++-${{ matrix.gcc }}
|
|
101
|
+
run: make -j$(nproc)
|
|
102
|
+
prevention:
|
|
103
|
+
- "Avoid hardcoding specific GCC versions (`gcc-12`, `gcc-11`) in workflow env vars — use the default `gcc` and pin the Ubuntu version instead"
|
|
104
|
+
- "When upgrading to ubuntu-24.04, audit all `CC=`, `CXX=`, `CMAKE_C_COMPILER=`, and `CMAKE_CXX_COMPILER=` references in workflows and CMakeLists.txt"
|
|
105
|
+
- "Use a matrix to explicitly pair OS version with GCC version to make the GCC dependency visible and testable"
|
|
106
|
+
- "GCC 13 introduced stricter warnings for C23 and C++23 features — review `-Werror` builds carefully after upgrading"
|
|
107
|
+
docs:
|
|
108
|
+
- url: "https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md"
|
|
109
|
+
label: "ubuntu-24.04 runner image README (installed compilers section)"
|
|
110
|
+
- url: "https://gcc.gnu.org/gcc-13/changes.html"
|
|
111
|
+
label: "GCC 13 release notes — breaking changes from GCC 12"
|
|
112
|
+
- url: "https://packages.ubuntu.com/noble/gcc"
|
|
113
|
+
label: "Ubuntu 24.04 Noble: gcc package (default version 13)"
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
id: runner-environment-126
|
|
2
|
+
title: "ubuntu-24.04 Runner: netstat / ifconfig Not Pre-installed (net-tools Removed)"
|
|
3
|
+
category: runner-environment
|
|
4
|
+
severity: error
|
|
5
|
+
tags:
|
|
6
|
+
- ubuntu-24
|
|
7
|
+
- netstat
|
|
8
|
+
- net-tools
|
|
9
|
+
- ifconfig
|
|
10
|
+
- network-diagnostics
|
|
11
|
+
- breaking-change
|
|
12
|
+
patterns:
|
|
13
|
+
- regex: 'netstat:\s*(command not found|not found)'
|
|
14
|
+
flags: 'i'
|
|
15
|
+
- regex: 'ifconfig:\s*(command not found|not found)'
|
|
16
|
+
flags: 'i'
|
|
17
|
+
- regex: '/usr/bin/netstat:\s*No such file or directory'
|
|
18
|
+
flags: 'i'
|
|
19
|
+
- regex: 'net-tools.*not installed'
|
|
20
|
+
flags: 'i'
|
|
21
|
+
error_messages:
|
|
22
|
+
- "netstat: command not found"
|
|
23
|
+
- "ifconfig: command not found"
|
|
24
|
+
- "/usr/bin/netstat: No such file or directory"
|
|
25
|
+
- "bash: netstat: command not found"
|
|
26
|
+
- "sh: 1: netstat: not found"
|
|
27
|
+
root_cause: |
|
|
28
|
+
The `net-tools` package — which provides `netstat`, `ifconfig`, `arp`, `route`, and
|
|
29
|
+
`nameif` — is not pre-installed on ubuntu-24.04 GitHub-hosted runner images. Ubuntu 24.04
|
|
30
|
+
(Noble Numbat) removed `net-tools` from its default package set, replacing these legacy
|
|
31
|
+
utilities with modern equivalents from the `iproute2` suite (`ss`, `ip`, `ip route`).
|
|
32
|
+
|
|
33
|
+
Ubuntu 22.04 runner images also do not guarantee `net-tools` is installed by default.
|
|
34
|
+
CI scripts that use `netstat -tlnp` to check which ports are listening, `ifconfig` to
|
|
35
|
+
inspect network interfaces, or `route -n` to check routing tables will fail immediately
|
|
36
|
+
with "command not found" on modern runner images.
|
|
37
|
+
|
|
38
|
+
This commonly appears in:
|
|
39
|
+
- Wait-for-port scripts that poll `netstat -tlnp | grep :8080`
|
|
40
|
+
- Service health check scripts using `netstat` to verify a database port is open
|
|
41
|
+
- Network diagnostics in CI debug steps
|
|
42
|
+
- Shell scripts copied from older Linux documentation that assume `net-tools` is present
|
|
43
|
+
fix: |
|
|
44
|
+
Replace `net-tools` commands with their `iproute2` equivalents, which are pre-installed
|
|
45
|
+
on all ubuntu runners. Alternatively, install `net-tools` via apt before using it.
|
|
46
|
+
fix_code:
|
|
47
|
+
- language: yaml
|
|
48
|
+
label: "Replace net-tools commands with iproute2 equivalents"
|
|
49
|
+
code: |
|
|
50
|
+
jobs:
|
|
51
|
+
test:
|
|
52
|
+
runs-on: ubuntu-latest
|
|
53
|
+
steps:
|
|
54
|
+
- uses: actions/checkout@v4
|
|
55
|
+
|
|
56
|
+
# ❌ net-tools commands — not pre-installed on ubuntu-24.04
|
|
57
|
+
# - run: netstat -tlnp | grep :5432
|
|
58
|
+
# - run: ifconfig eth0
|
|
59
|
+
# - run: route -n
|
|
60
|
+
|
|
61
|
+
# ✅ iproute2 equivalents — pre-installed on all ubuntu runners
|
|
62
|
+
- name: Check listening ports
|
|
63
|
+
run: ss -tlnp | grep :5432 # replaces: netstat -tlnp | grep :5432
|
|
64
|
+
|
|
65
|
+
- name: Inspect network interface
|
|
66
|
+
run: ip addr show eth0 # replaces: ifconfig eth0
|
|
67
|
+
|
|
68
|
+
- name: Check routing table
|
|
69
|
+
run: ip route show # replaces: route -n
|
|
70
|
+
- language: yaml
|
|
71
|
+
label: "Install net-tools if migrating scripts is not feasible"
|
|
72
|
+
code: |
|
|
73
|
+
jobs:
|
|
74
|
+
test:
|
|
75
|
+
runs-on: ubuntu-latest
|
|
76
|
+
steps:
|
|
77
|
+
- uses: actions/checkout@v4
|
|
78
|
+
|
|
79
|
+
- name: Install net-tools (legacy compatibility)
|
|
80
|
+
run: sudo apt-get install -y --no-install-recommends net-tools
|
|
81
|
+
|
|
82
|
+
- name: Wait for database port
|
|
83
|
+
run: |
|
|
84
|
+
for i in $(seq 1 30); do
|
|
85
|
+
netstat -tlnp | grep -q :5432 && break
|
|
86
|
+
sleep 1
|
|
87
|
+
done
|
|
88
|
+
prevention:
|
|
89
|
+
- "Prefer `ss` over `netstat` and `ip addr` over `ifconfig` in all new CI scripts — they are pre-installed on every ubuntu runner"
|
|
90
|
+
- "Audit shell scripts checked into the repo for `netstat`, `ifconfig`, `arp`, and `route` commands before upgrading runners to ubuntu-24.04"
|
|
91
|
+
- "For wait-for-port patterns, consider using `nc -z localhost PORT` or `/dev/tcp/localhost/PORT` instead of polling netstat"
|
|
92
|
+
- "`ss -tlnp` is functionally identical to `netstat -tlnp` for port-checking — it is a direct substitute"
|
|
93
|
+
docs:
|
|
94
|
+
- url: "https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md"
|
|
95
|
+
label: "ubuntu-24.04 runner image installed software README"
|
|
96
|
+
- url: "https://manpages.ubuntu.com/manpages/noble/man8/ss.8.html"
|
|
97
|
+
label: "Ubuntu 24.04 manpage: ss (replaces netstat)"
|
|
98
|
+
- url: "https://wiki.ubuntu.com/FocalFossa/ReleaseNotes#net-tools_Removal"
|
|
99
|
+
label: "Ubuntu release notes: net-tools deprecation in favor of iproute2"
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
id: runner-environment-128
|
|
2
|
+
title: "ubuntu-22.04/24.04: apt-key Deprecated — Third-Party Repo Keys Cause NO_PUBKEY Errors"
|
|
3
|
+
category: runner-environment
|
|
4
|
+
severity: error
|
|
5
|
+
tags:
|
|
6
|
+
- ubuntu-22
|
|
7
|
+
- ubuntu-24
|
|
8
|
+
- apt
|
|
9
|
+
- apt-key
|
|
10
|
+
- gpg
|
|
11
|
+
- package-signing
|
|
12
|
+
- third-party-repo
|
|
13
|
+
patterns:
|
|
14
|
+
- regex: 'apt-key\s+is\s+deprecated'
|
|
15
|
+
flags: 'i'
|
|
16
|
+
- regex: 'NO_PUBKEY\s+[0-9A-F]{16}'
|
|
17
|
+
flags: 'i'
|
|
18
|
+
- regex: 'W:\s*Key\s+is\s+stored\s+in\s+legacy\s+trusted\.gpg\s+keyring'
|
|
19
|
+
flags: 'i'
|
|
20
|
+
- regex: 'The following signatures couldn''t be verified because the public key is not available'
|
|
21
|
+
flags: 'i'
|
|
22
|
+
error_messages:
|
|
23
|
+
- "W: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8))."
|
|
24
|
+
- "W: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details."
|
|
25
|
+
- "The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A1715D88E1DF1F24"
|
|
26
|
+
- "W: http://ppa.launchpad.net/...: NO_PUBKEY"
|
|
27
|
+
- "GPG error: ... NO_PUBKEY"
|
|
28
|
+
root_cause: |
|
|
29
|
+
`apt-key` was deprecated in Ubuntu 22.04 and is scheduled for removal in future Ubuntu
|
|
30
|
+
versions. On ubuntu-22.04 and ubuntu-24.04 GitHub-hosted runner images, workflows that
|
|
31
|
+
add third-party repository GPG keys using `apt-key add -` or `apt-key adv --keyserver`
|
|
32
|
+
emit deprecation warnings and, in some configurations, fail to authenticate packages.
|
|
33
|
+
|
|
34
|
+
The old method stored keys in `/etc/apt/trusted.gpg` — a global keyring trusted for ALL
|
|
35
|
+
repositories. Ubuntu 22.04 began phasing this out in favor of per-repository keyrings
|
|
36
|
+
stored as `.gpg` files under `/usr/share/keyrings/`, referenced via `signed-by=` in
|
|
37
|
+
the sources list entry.
|
|
38
|
+
|
|
39
|
+
Common symptoms:
|
|
40
|
+
- `apt-get update` emits "NO_PUBKEY" warnings followed by package authentication failures
|
|
41
|
+
- Installing packages from third-party PPAs (e.g., Google Chrome, Hashicorp, NodeSource)
|
|
42
|
+
fails with "The following packages cannot be authenticated"
|
|
43
|
+
- Steps that use `add-apt-repository ppa:...` work on ubuntu-20.04 but produce warnings
|
|
44
|
+
or fail on ubuntu-22.04/24.04
|
|
45
|
+
|
|
46
|
+
Workflows that pipe curl output directly into `apt-key add -` (a historically common
|
|
47
|
+
pattern in CI setup scripts) will produce warnings on ubuntu-22.04 and may fail silently
|
|
48
|
+
on ubuntu-24.04 if the key is not recognized by the new keyring mechanism.
|
|
49
|
+
fix: |
|
|
50
|
+
Replace `apt-key add` with the modern pattern: download the GPG key as a dearmored `.gpg`
|
|
51
|
+
file into `/usr/share/keyrings/`, then reference it with `signed-by=` in the apt sources
|
|
52
|
+
list entry. This is the Ubuntu 22.04+ recommended approach.
|
|
53
|
+
fix_code:
|
|
54
|
+
- language: yaml
|
|
55
|
+
label: "Old pattern (deprecated) vs new signed-by pattern"
|
|
56
|
+
code: |
|
|
57
|
+
jobs:
|
|
58
|
+
setup:
|
|
59
|
+
runs-on: ubuntu-latest
|
|
60
|
+
steps:
|
|
61
|
+
- uses: actions/checkout@v4
|
|
62
|
+
|
|
63
|
+
# ❌ Deprecated: apt-key add — produces warnings on 22.04, may fail on 24.04
|
|
64
|
+
# - name: Add Hashicorp repo (old way)
|
|
65
|
+
# run: |
|
|
66
|
+
# curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -
|
|
67
|
+
# sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"
|
|
68
|
+
|
|
69
|
+
# ✅ Modern pattern: signed-by= with per-repo keyring file
|
|
70
|
+
- name: Add Hashicorp repo (modern way)
|
|
71
|
+
run: |
|
|
72
|
+
curl -fsSL https://apt.releases.hashicorp.com/gpg \
|
|
73
|
+
| sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
|
|
74
|
+
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] \
|
|
75
|
+
https://apt.releases.hashicorp.com $(lsb_release -cs) main" \
|
|
76
|
+
| sudo tee /etc/apt/sources.list.d/hashicorp.list
|
|
77
|
+
|
|
78
|
+
- name: Install Terraform
|
|
79
|
+
run: |
|
|
80
|
+
sudo apt-get update
|
|
81
|
+
sudo apt-get install -y terraform
|
|
82
|
+
- language: yaml
|
|
83
|
+
label: "NodeSource / NVM repo setup using modern keyring pattern"
|
|
84
|
+
code: |
|
|
85
|
+
jobs:
|
|
86
|
+
setup:
|
|
87
|
+
runs-on: ubuntu-latest
|
|
88
|
+
steps:
|
|
89
|
+
- uses: actions/checkout@v4
|
|
90
|
+
# Modern NodeSource setup (replaces legacy curl | bash installer)
|
|
91
|
+
- name: Add NodeSource repo
|
|
92
|
+
run: |
|
|
93
|
+
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key \
|
|
94
|
+
| sudo gpg --dearmor -o /usr/share/keyrings/nodesource.gpg
|
|
95
|
+
echo "deb [signed-by=/usr/share/keyrings/nodesource.gpg] \
|
|
96
|
+
https://deb.nodesource.com/node_20.x nodistro main" \
|
|
97
|
+
| sudo tee /etc/apt/sources.list.d/nodesource.list
|
|
98
|
+
- run: sudo apt-get update && sudo apt-get install -y nodejs
|
|
99
|
+
prevention:
|
|
100
|
+
- "Replace all `apt-key add -` calls with the `gpg --dearmor` + `signed-by=` pattern — it works on ubuntu-20.04 through ubuntu-24.04"
|
|
101
|
+
- "Third-party vendors (Hashicorp, Google, Microsoft, NodeSource) have updated their installation docs to use the modern pattern — follow vendor docs rather than old blog posts"
|
|
102
|
+
- "For PPA repositories, use `add-apt-repository --no-update` with the modern key format, or switch to the vendor's official deb repo"
|
|
103
|
+
- "Audit CI scripts for `curl ... | apt-key add -` pipelines — these are the most common source of this error"
|
|
104
|
+
docs:
|
|
105
|
+
- url: "https://manpages.ubuntu.com/manpages/jammy/man8/apt-key.8.html"
|
|
106
|
+
label: "Ubuntu apt-key(8) manpage — DEPRECATION section"
|
|
107
|
+
- url: "https://wiki.debian.org/DebianRepository/UseThirdParty"
|
|
108
|
+
label: "Debian Wiki: Using Third-Party Repositories (modern signed-by pattern)"
|
|
109
|
+
- url: "https://github.com/actions/runner-images/issues/7213"
|
|
110
|
+
label: "runner-images GitHub Issue: apt-key deprecation warnings on ubuntu-22.04"
|
package/package.json
CHANGED