feat: runner images for Ubuntu 24.04, 26.04 and 26.10
Images built on buildpack-deps with every tool our workflows used to download on each run baked in: node 26 (installed into RUNNER_TOOL_CACHE so setup-node never calls the GitHub API), pnpm, corepack, python3, docker CLI with buildx and compose, git with lfs, jq, yq, tea, go, rust with the musl target, cargo-zigbuild, zig, gh, trivy and nfpm. Adds the pull-request build with smoke tests, the release workflow that publishes ubuntu-24.04 / ubuntu-26.04 / ubuntu-26.10 plus the ubuntu-latest alias, Renovate annotations for every pinned version, and the docs: README, CHANGELOG (Keep a Changelog 1.1.0), SECURITY with the security@fristy.dev PGP key, CONTRIBUTING (Conventional Branch, SemVer), CODE_OF_CONDUCT and MIT LICENSE.
This commit is contained in:
11 files changed
+885
No files matched your search
@@ -0,0 +1,56 @@
|
||||
#!/usr/bin/env bash
|
||||
# Smoke test for the runner image. Runs inside the built image:
|
||||
# docker run --rm -i <image> bash -s -- <ubuntu version> < tests/default.sh
|
||||
# shellcheck disable=SC1091,SC2016
|
||||
set -euo pipefail
|
||||
|
||||
version="${1:?usage: default.sh <ubuntu version>}"
|
||||
|
||||
. /etc/os-release
|
||||
[[ "${VERSION_ID}" == "${version}" ]] || {
|
||||
echo "expected Ubuntu ${version}, got ${VERSION_ID}" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
# The runner relies on these to detect the image and the tool cache.
|
||||
[[ "${ImageOS}" == "ubuntu${version%%.*}" ]] || { echo "bad ImageOS: ${ImageOS}" >&2; exit 1; }
|
||||
[[ "${IMAGE_OS}" == "ubuntu${version%%.*}" ]] || { echo "bad IMAGE_OS: ${IMAGE_OS}" >&2; exit 1; }
|
||||
[[ "${AGENT_TOOLSDIRECTORY}" == /opt/hostedtoolcache ]]
|
||||
[[ "${RUNNER_TOOL_CACHE}" == /opt/hostedtoolcache ]]
|
||||
[[ "${USER}" == root ]]
|
||||
|
||||
# setup-node must find a complete node tool-cache entry, otherwise it downloads node.
|
||||
node_dir="$(echo /opt/hostedtoolcache/node/*/x64)"
|
||||
[[ -f "${node_dir}.complete" ]] || { echo "no complete node tool cache entry" >&2; exit 1; }
|
||||
test -w "${node_dir}"
|
||||
|
||||
su nobody -s /bin/sh -c 'test -w /opt/hostedtoolcache && test -w /opt/pipx/venvs && test -w /opt/pipx_bin'
|
||||
test -d /github
|
||||
git config --system --get-all safe.directory | grep -qxF '*'
|
||||
|
||||
# Everything below is what workflows used to download on every run.
|
||||
node --version
|
||||
npm --version
|
||||
pnpm --version
|
||||
corepack --version
|
||||
python3 --version
|
||||
docker --version
|
||||
docker buildx version
|
||||
docker compose version
|
||||
git --version
|
||||
git lfs version
|
||||
jq --version
|
||||
yq --version
|
||||
tea --version
|
||||
go version
|
||||
rustc --version
|
||||
cargo --version
|
||||
cargo zigbuild --help > /dev/null
|
||||
rustup target list --installed | grep -qx 'aarch64-unknown-linux-musl'
|
||||
zig version
|
||||
gh --version
|
||||
trivy --version
|
||||
nfpm --version
|
||||
yamllint --version
|
||||
|
||||
echo "smoke test passed for Ubuntu ${version}"
|
||||
Reference in new issue
Block a user