Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

isAlpine detection fails on quoted ID value in /etc/os-release

Open Beginner friendly
#455 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
docker, kubernetes, linux, typescript
Domain
ci-cd

Research direction

The failing check is the shell command [ $(cat /etc/*release* | grep -i -e "^ID=*alpine*" -c) != 0 ] that the log shows running from /home/runner/k8s/index.js; find where that string is built in the TypeScript source. Make the grep pattern accept an optional quote around the ID value, then confirm it matches both ID=alpine and ID="alpine" from the two /etc/os-release outputs in the issue. Done when isAlpine resolves to true for the quoted DHI image and nothing else changes.

Written by the indexing model from the issue text.

Description

The DHI team has recently introduced changes to the /etc/os-release file which impacts isAlpine detection on GHA runners.
The breaking change introduced is they double-quote the ID field used by the runner-container-hooks script.
The runner hooks script should be updated to take into account quoted ID values too in order for the isAlpine process to be more resilient.

Run '/home/runner/k8s/index.js'

Alpine DHI result with quoted ID value:

##[debug]Job pod is ready for traffic
##[debug]{"message":"command terminated with non-zero exit code: error executing command [sh -c [ $(cat /etc/*release* | grep -i -e \"^ID=*alpine*\" -c) != 0 ] || exit 1], exit code 1","details":{"causes":[{"reason":"ExitCode","message":"1"}]}}
##[debug]Setting isAlpine to false
##[debug]Finishing: Initialize containers

WORKS

❯ docker container run --rm -it alpine:3.24 sh -c 'cat /etc/os-release' | grep ID
ID=alpine
VERSION_ID=3.24.2

FAILS

❯ docker container run --rm dhi.io/alpine-base:3.24-alpine3.24-dev sh -c 'cat /etc/os-release' | grep ID
ID="alpine"
VERSION_ID="3.24"
Dominant language
TypeScript
Stars
155
Forks
114
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from actions/runner-container-hooks

All issues in actions/runner-container-hooks

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.