Stop the CI jobs that can never pass here: no docker daemon, and CodeQL needs GitHub #575
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge!575
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "ci/docker-job-without-daemon"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Forgejo reads
.github/workflowsas well as.forgejo/workflows, and the runner is a single container job image (node:20-bookworm) with no docker binary and no/var/run/docker.sock. Two consequences, both permanent red checks on every pull request for reasons unrelated to the change:docker build. Verified:docker run --rm node:20-bookworm sh -c 'command -v docker'->NO_DOCKER_IN_JOB_IMAGE; no socket either. It now validates the Dockerfile statically (base pinned, non-root, healthcheck, CMD/ENTRYPOINT, every COPY source and the entrypoint exist) and runs the real build only where a daemon is available, saying so when it is not. The Dockerfile is sound:docker build -t packetforge:ci .succeeds locally and produces an image, so the static check is a floor, not a substitute.main. It, the duplicate copy of the CI matrix, the GHCR release job and the labeler now carryif: github.server_url == 'https://github.com': skipped on Forgejo, unchanged on the mirror.Net effect: the Forgejo queue stops burning its single runner on jobs that cannot pass, and a red check means something again.
The docker job was a bare `docker build`. The runner's job image is node:20-bookworm, which has no docker binary and no /var/run/docker.sock - verified directly: docker run --rm node:20-bookworm sh -c 'command -v docker' -> NO_DOCKER_IN_JOB_IMAGE docker run --rm node:20-bookworm ls -l /var/run/docker.sock -> No such file or directory So that check was red on every pull request for reasons that had nothing to do with the change, which is enough to make people ignore CI entirely. The job now validates the Dockerfile statically first - base image pinned, not root, healthcheck present, CMD/ENTRYPOINT present, every COPY source exists, entrypoint script exists - and then runs the real `docker build` only where a daemon is actually available, saying plainly in the log when it is not. The Dockerfile itself is sound: `docker build -t packetforge:ci .` succeeds locally and produces an image, so the static checks are a floor, not a substitute. scripts/check-dockerfile.js is a normal script, so it runs identically on a laptop.Fix the Docker job that could never passto Stop the CI jobs that can never pass here: no docker daemon, and CodeQL needs GitHubForgejo reads .github/workflows as well as .forgejo/workflows, so every job in there ran on odin-runner too: - Analyze (CodeQL) uploads SARIF to github.com with a GitHub token. Impossible here, so it failed on every push, including main (cb2bc48,41e7030,51eba47). - A second copy of the CI matrix doubled the queue for every pull request, on a runner whose capacity is one. - The GHCR release job and the GitHub labeler are equally GitHub-only. Each job now carries `if: github.server_url == 'https://github.com'`: skipped on Forgejo, unchanged on the mirror. Nine jobs across five workflows; the Forgejo workflow is untouched.54358b6e9690ef1522dd