From af33f7eb124b51ff6d9cdf9b428643e2246c8cbb Mon Sep 17 00:00:00 2001 From: En-En <39373446+En-En-Code@users.noreply.github.com> Date: Wed, 27 Aug 2025 00:17:25 +0000 Subject: [PATCH] ci: comment logic of set-vars.sh --- .github/workflows/set-vars.sh | 6 ++++++ .github/workflows/ubuntu.dockerfile | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/set-vars.sh b/.github/workflows/set-vars.sh index 3db73aa..edfa0ec 100755 --- a/.github/workflows/set-vars.sh +++ b/.github/workflows/set-vars.sh @@ -1,5 +1,7 @@ #!/bin/sh +# Find the line specifying the version number for the Rust toolchain, then +# extract that version number. Failure to do so aborts the CI run. msrv=$( awk '/^rust-version = "[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+"$/ { print substr($NF, 2, length($NF) - 2) @@ -10,6 +12,10 @@ if [ -z $msrv ]; then exit 1 fi +# Check for one of two conditions to regenerate the Docker image: +# (These conditions must be met on `main` and not a PR branch, see ci.yml) +# 1. An annotated tag was found when fetching the tags at depth 1 (tags on HEAD) +# 2. "$UBUNTU_DOCKERFILE" was changed between HEAD and the prior commit (HEAD~1) git fetch --depth=1 origin +refs/tags/*:refs/tags/* if ! git diff HEAD~1 --quiet -- "$UBUNTU_DOCKERFILE" || git describe --candidates=0; then diff --git a/.github/workflows/ubuntu.dockerfile b/.github/workflows/ubuntu.dockerfile index 4484ed4..041e341 100644 --- a/.github/workflows/ubuntu.dockerfile +++ b/.github/workflows/ubuntu.dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:latest +FROM ubuntu:24.04 ARG DEBIAN_FRONTEND=noninteractive ENV TZ=Etc/UTC