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
+877
No files matched your search
@@ -0,0 +1,63 @@
|
||||
name: build
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
# Builds, scans and smoke tests the images without publishing anything.
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 120
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
base: ["26.10", "26.04", "24.04"]
|
||||
env:
|
||||
IMAGE: runner-images-test:${{ github.run_id }}-${{ matrix.base }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v7
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v4
|
||||
|
||||
- name: Build ${{ matrix.base }} amd64
|
||||
uses: docker/build-push-action@v7
|
||||
with:
|
||||
context: .
|
||||
file: dockerfiles/ubuntu.dockerfile
|
||||
platforms: linux/amd64
|
||||
pull: true
|
||||
push: false
|
||||
load: true
|
||||
build-args: |
|
||||
BASE_IMAGE_TAG=${{ matrix.base }}
|
||||
tags: ${{ env.IMAGE }}
|
||||
|
||||
- name: Smoke test ${{ matrix.base }}
|
||||
run: docker run --rm -i "${IMAGE}" bash -s -- ${{ matrix.base }} < tests/default.sh
|
||||
|
||||
- name: Scan ${{ matrix.base }} for CRITICAL vulnerabilities
|
||||
run: |
|
||||
docker run --rm "${IMAGE}" trivy rootfs / \
|
||||
--quiet --scanners vuln --severity CRITICAL --ignore-unfixed --exit-code 1 --no-progress
|
||||
|
||||
- name: Report HIGH vulnerabilities for ${{ matrix.base }}
|
||||
if: always()
|
||||
run: |
|
||||
docker run --rm "${IMAGE}" trivy rootfs / \
|
||||
--quiet --scanners vuln --severity HIGH --ignore-unfixed --exit-code 1 --no-progress \
|
||||
--format table || echo "HIGH findings present; not blocking the pull request"
|
||||
|
||||
- name: Remove test image
|
||||
if: always()
|
||||
run: docker image rm -f "${IMAGE}"
|
||||
@@ -0,0 +1,110 @@
|
||||
name: release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
tags: ["v*"]
|
||||
schedule:
|
||||
- cron: "0 3 1 * *"
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
concurrency:
|
||||
group: release
|
||||
cancel-in-progress: false
|
||||
|
||||
env:
|
||||
REGISTRY: git.fristy.net
|
||||
IMAGE: git.fristy.net/actions/runner-images
|
||||
|
||||
jobs:
|
||||
meta:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
created: ${{ steps.meta.outputs.created }}
|
||||
version: ${{ steps.meta.outputs.version }}
|
||||
steps:
|
||||
- name: Get meta
|
||||
id: meta
|
||||
run: |
|
||||
echo "created=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> "$GITHUB_OUTPUT"
|
||||
if [ "${GITHUB_REF_TYPE}" = "tag" ]; then
|
||||
version="${GITHUB_REF_NAME}"
|
||||
else
|
||||
version="v0.0.0-dev.$(printf '%s' "${GITHUB_SHA}" | cut -c1-7)"
|
||||
fi
|
||||
echo "version=${version}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
publish:
|
||||
needs: meta
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 180
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- base: "24.04"
|
||||
tags: ubuntu-24.04
|
||||
- base: "26.04"
|
||||
tags: ubuntu-26.04
|
||||
- base: "26.10"
|
||||
tags: ubuntu-26.10,ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v7
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v4
|
||||
|
||||
- name: Log in to the registry
|
||||
run: |
|
||||
token="${{ secrets.REGISTRY_TOKEN }}"
|
||||
[ -n "$token" ] || { echo "REGISTRY_TOKEN secret is missing" >&2; exit 1; }
|
||||
echo "$token" | docker login "$REGISTRY" -u "${{ secrets.REGISTRY_USERNAME || github.actor }}" --password-stdin
|
||||
|
||||
- name: Build ${{ matrix.base }}
|
||||
uses: docker/build-push-action@v7
|
||||
with:
|
||||
context: .
|
||||
file: dockerfiles/ubuntu.dockerfile
|
||||
platforms: linux/amd64
|
||||
pull: true
|
||||
push: false
|
||||
load: true
|
||||
tags: ${{ env.IMAGE }}:ubuntu-${{ matrix.base }}
|
||||
cache-from: type=registry,ref=${{ env.IMAGE }}:buildcache-${{ matrix.base }}
|
||||
cache-to: type=registry,ref=${{ env.IMAGE }}:buildcache-${{ matrix.base }},mode=max
|
||||
build-args: |
|
||||
BASE_IMAGE_TAG=${{ matrix.base }}
|
||||
IMAGE_CREATED=${{ needs.meta.outputs.created }}
|
||||
IMAGE_VERSION=${{ needs.meta.outputs.version }}
|
||||
IMAGE_REVISION=${{ github.sha }}
|
||||
|
||||
- name: Smoke test ${{ matrix.base }}
|
||||
run: docker run --rm -i "${IMAGE}:ubuntu-${{ matrix.base }}" bash -s -- ${{ matrix.base }} < tests/default.sh
|
||||
|
||||
- name: Scan ${{ matrix.base }} for CRITICAL vulnerabilities
|
||||
run: |
|
||||
docker run --rm "${IMAGE}:ubuntu-${{ matrix.base }}" trivy rootfs / \
|
||||
--quiet --scanners vuln --severity CRITICAL --ignore-unfixed --exit-code 1 --no-progress
|
||||
|
||||
- name: Report HIGH vulnerabilities for ${{ matrix.base }}
|
||||
if: always()
|
||||
run: |
|
||||
docker run --rm "${IMAGE}:ubuntu-${{ matrix.base }}" trivy rootfs / \
|
||||
--quiet --scanners vuln --severity HIGH --ignore-unfixed --exit-code 1 --no-progress \
|
||||
--format table || echo "HIGH findings present; recorded above, not blocking the release"
|
||||
|
||||
- name: Push ${{ matrix.base }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
printf '%s\n' "${{ matrix.tags }}" | tr ',' '\n' | while read -r tag; do
|
||||
[ -n "${tag}" ] || continue
|
||||
docker tag "${IMAGE}:ubuntu-${{ matrix.base }}" "${IMAGE}:${tag}"
|
||||
docker push "${IMAGE}:${tag}"
|
||||
done
|
||||
docker tag "${IMAGE}:ubuntu-${{ matrix.base }}" "${IMAGE}:${{ needs.meta.outputs.version }}-${{ matrix.base }}"
|
||||
docker push "${IMAGE}:${{ needs.meta.outputs.version }}-${{ matrix.base }}"
|
||||
Reference in new issue
Block a user