fix: upgrade base packages and npm to clear the image scan
build / build (26.04) (pull_request) Successful in 3m34s
build / build (26.10) (pull_request) Successful in 3m35s
build / build (24.04) (pull_request) Successful in 3m38s

apt-get upgrade keeps buildpack-deps from freezing linux-libc-dev at the
version the base image shipped with; five CRITICAL kernel CVEs in that
package alone failed the 24.04 publish. npm 11.21.3 replaces the undici
6.28.0 and brace-expansion 5.0.9 bundled with node 26.13.1, 12 HIGH
findings. The npm tree is copied back into the tool cache because the
in-place upgrade breaks its hardlink.

Release pipeline: each main build now cuts the next patch from the newest
v* tag, publishes v<semver>-ubuntu-<base> next to the moving ubuntu-<base>
tags, and only tags the commit after every base has published, so a failed
scan can no longer leave a half published version. The v0.0.0-dev.<sha>
fallback is gone.

Docs: README no longer pins tool versions that Renovate already tracks, and
the image tags, versioning and commit conventions are written down.
This commit is contained in:
fristy committed 2026-11-20 14:35:30 +03:00
1 parent 24f61b6217
commit a7f9769a82
6 files changed
+131 -51

No files matched your search

+46 -7
View File
@@ -3,14 +3,16 @@ name: release
on:
push:
branches: [main]
tags: ["v*"]
schedule:
- cron: "0 3 1 * *"
workflow_dispatch:
inputs:
version:
description: "Release to cut, e.g. v1.1.0. Empty means the next patch."
required: false
permissions:
contents: read
packages: write
concurrency:
group: release
@@ -20,6 +22,8 @@ env:
REGISTRY: git.fristy.net
IMAGE: git.fristy.net/actions/runner-images
# Each run on main cuts a patch release and tags the commit afterwards. A tag
# push does not trigger this workflow, so the tag cannot loop back.
jobs:
meta:
runs-on: ubuntu-latest
@@ -27,15 +31,28 @@ jobs:
created: ${{ steps.meta.outputs.created }}
version: ${{ steps.meta.outputs.version }}
steps:
- name: Checkout
uses: actions/checkout@v7
with:
fetch-depth: 0
- 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}"
latest="$(git tag --list 'v*' --sort=-v:refname | head -n1)"
if [ -z "${latest}" ]; then
next="v1.0.0"
else
version="v0.0.0-dev.$(printf '%s' "${GITHUB_SHA}" | cut -c1-7)"
next="v$(awk -F. '{print $1"."$2"."$3+1}' <<< "${latest#v}")"
fi
override='${{ github.event.inputs.version }}'
[ "${override}" = "null" ] && override=''
version="${override:-${next}}"
[[ "${version}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]] || {
echo "invalid version '${version}', expected v<major>.<minor>.<patch>" >&2
exit 1
}
echo "version=${version}" >> "$GITHUB_OUTPUT"
publish:
@@ -101,10 +118,32 @@ jobs:
- name: Push ${{ matrix.base }}
run: |
set -euo pipefail
version="${{ needs.meta.outputs.version }}"
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 }}"
docker tag "${IMAGE}:ubuntu-${{ matrix.base }}" "${IMAGE}:${version}-ubuntu-${{ matrix.base }}"
docker push "${IMAGE}:${version}-ubuntu-${{ matrix.base }}"
tag:
needs: [meta, publish]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Tag the release
run: |
version="${{ needs.meta.outputs.version }}"
if git rev-parse -q --verify "refs/tags/${version}" > /dev/null; then
echo "${version} is already tagged"
exit 0
fi
git tag -a "${version}" -m "${version}" "${GITHUB_SHA}"
git push origin "refs/tags/${version}"