From ed8d7ba184e5fc19a2c041a776c572bbce623c8e Mon Sep 17 00:00:00 2001 From: JacobDomagala Date: Tue, 28 Oct 2025 13:23:12 +0100 Subject: [PATCH 1/5] [#148]: Update cppcheck and clang-tidy --- docker/static_analysis.dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker/static_analysis.dockerfile b/docker/static_analysis.dockerfile index e642c3f..0a5f474 100644 --- a/docker/static_analysis.dockerfile +++ b/docker/static_analysis.dockerfile @@ -1,6 +1,6 @@ FROM ubuntu:24.04 AS cppcheck-builder -ARG CPPCHECK_VERSION=2.16.0 +ARG CPPCHECK_VERSION=2.20.0 ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update \ @@ -44,7 +44,7 @@ RUN apt-get update \ FROM ubuntu:24.04 AS llvm-repo -ARG CLANG_VERSION=20 +ARG CLANG_VERSION=23 ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update \ @@ -59,7 +59,7 @@ RUN apt-get update \ FROM ubuntu:24.04 AS base -ARG CLANG_VERSION=20 +ARG CLANG_VERSION=23 ENV DEBIAN_FRONTEND=noninteractive \ CLANG_VERSION=${CLANG_VERSION} \ CC=clang \ From ff46a662a8320ce7eb8dfd316ed6a521c27e8134 Mon Sep 17 00:00:00 2001 From: JacobDomagala Date: Tue, 28 Oct 2025 13:23:12 +0100 Subject: [PATCH 2/5] [#148]: Use clang-tidy-22 --- docker/static_analysis.dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/static_analysis.dockerfile b/docker/static_analysis.dockerfile index 0a5f474..bd52a6c 100644 --- a/docker/static_analysis.dockerfile +++ b/docker/static_analysis.dockerfile @@ -44,7 +44,7 @@ RUN apt-get update \ FROM ubuntu:24.04 AS llvm-repo -ARG CLANG_VERSION=23 +ARG CLANG_VERSION=22 ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update \ @@ -59,7 +59,7 @@ RUN apt-get update \ FROM ubuntu:24.04 AS base -ARG CLANG_VERSION=23 +ARG CLANG_VERSION=22 ENV DEBIAN_FRONTEND=noninteractive \ CLANG_VERSION=${CLANG_VERSION} \ CC=clang \ From 8b1430cdb809f91b46d234ae364bc40f8cab97f8 Mon Sep 17 00:00:00 2001 From: JacobDomagala Date: Tue, 28 Oct 2025 13:23:12 +0100 Subject: [PATCH 3/5] [#148]: Fix issue with clang-tidy --- docker/static_analysis.dockerfile | 12 ++++++++---- entrypoint_cpp.sh | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/docker/static_analysis.dockerfile b/docker/static_analysis.dockerfile index bd52a6c..c2e96e1 100644 --- a/docker/static_analysis.dockerfile +++ b/docker/static_analysis.dockerfile @@ -44,7 +44,7 @@ RUN apt-get update \ FROM ubuntu:24.04 AS llvm-repo -ARG CLANG_VERSION=22 +ARG CLANG_VERSION=23 ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update \ @@ -53,13 +53,13 @@ RUN apt-get update \ gnupg \ wget \ && wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | gpg --dearmor -o /llvm.gpg \ - && printf "deb [signed-by=/usr/share/keyrings/llvm.gpg] http://apt.llvm.org/noble/ llvm-toolchain-noble-%s main\n" "${CLANG_VERSION}" > /llvm.list \ + && printf "deb [signed-by=/usr/share/keyrings/llvm.gpg] http://apt.llvm.org/noble/ llvm-toolchain-noble main\n" > /llvm.list \ && rm -rf /var/lib/apt/lists/* FROM ubuntu:24.04 AS base -ARG CLANG_VERSION=22 +ARG CLANG_VERSION=23 ENV DEBIAN_FRONTEND=noninteractive \ CLANG_VERSION=${CLANG_VERSION} \ CC=clang \ @@ -69,12 +69,16 @@ ENV DEBIAN_FRONTEND=noninteractive \ COPY --from=python-tools-builder /opt/python-tools /opt/python-tools COPY --from=cppcheck-builder /opt/cppcheck /opt/cppcheck + +RUN apt-get update \ + && apt-get install -y --no-install-recommends ca-certificates \ + && rm -rf /var/lib/apt/lists/* + COPY --from=llvm-repo /llvm.gpg /usr/share/keyrings/llvm.gpg COPY --from=llvm-repo /llvm.list /etc/apt/sources.list.d/llvm.list RUN apt-get update \ && apt-get install -y --no-install-recommends \ - ca-certificates \ cmake \ git \ make \ diff --git a/entrypoint_cpp.sh b/entrypoint_cpp.sh index 35f1d8d..09aeb51 100644 --- a/entrypoint_cpp.sh +++ b/entrypoint_cpp.sh @@ -11,7 +11,7 @@ common_ancestor=${common_ancestor:-""} CLANG_TIDY_ARGS="${INPUT_CLANG_TIDY_ARGS//$'\n'/}" CPPCHECK_ARGS="${INPUT_CPPCHECK_ARGS//$'\n'/}" -RUN_CLANG_TIDY_BIN="${RUN_CLANG_TIDY_BIN:-$(command -v run-clang-tidy || command -v "run-clang-tidy-${CLANG_VERSION:-20}" || compgen -c | grep '^run-clang-tidy-[0-9]\+$' | head -n 1 || true)}" +RUN_CLANG_TIDY_BIN="${RUN_CLANG_TIDY_BIN:-$(command -v run-clang-tidy || command -v "run-clang-tidy-${CLANG_VERSION:-23}" || compgen -c | grep '^run-clang-tidy-[0-9]\+$' | head -n 1 || true)}" if [ -z "$RUN_CLANG_TIDY_BIN" ]; then debug_print "Error: run-clang-tidy executable not found in PATH." From 3183bc1af8d002ba04680a4867ab589711e3d3d8 Mon Sep 17 00:00:00 2001 From: JacobDomagala Date: Tue, 28 Oct 2025 13:23:12 +0100 Subject: [PATCH 4/5] [#148]: Add new findings to expected errors after updating the image --- .../test-branch-fork__sa-cmake-output.md | 4 +-- .../test-branch-fork__sa-non-cmake-output.md | 4 +-- .../test-static-analysis__sa-cmake-output.md | 33 +++++++++++++++++-- ...st-static-analysis__sa-non-cmake-output.md | 4 +-- .../test-static-analysis__sa-cmake-output.txt | 7 ++-- ...t-static-analysis__sa-non-cmake-output.txt | 7 ++-- 6 files changed, 46 insertions(+), 13 deletions(-) diff --git a/.github/testrepo_comment_fixtures/test-branch-fork__sa-cmake-output.md b/.github/testrepo_comment_fixtures/test-branch-fork__sa-cmake-output.md index acf9192..5d8e53b 100644 --- a/.github/testrepo_comment_fixtures/test-branch-fork__sa-cmake-output.md +++ b/.github/testrepo_comment_fixtures/test-branch-fork__sa-cmake-output.md @@ -54,7 +54,7 @@ int evaluate(int x) { ``` ```diff -!Line: 9 - warning: Class 'DataProcessor' does not have a copy constructor which is recommended since it has dynamic memory/resource allocation(s). [noCopyConstructor] +!Line: 9 - warning: Class 'DataProcessor' does not have a copy constructor which is recommended since it has dynamic memory/resource management. [noCopyConstructor] ```
@@ -74,7 +74,7 @@ int evaluate(int x) { ``` ```diff -!Line: 9 - warning: Class 'DataProcessor' does not have a operator= which is recommended since it has dynamic memory/resource allocation(s). [noOperatorEq] +!Line: 9 - warning: Class 'DataProcessor' does not have a operator= which is recommended since it has dynamic memory/resource management. [noOperatorEq] ```
diff --git a/.github/testrepo_comment_fixtures/test-branch-fork__sa-non-cmake-output.md b/.github/testrepo_comment_fixtures/test-branch-fork__sa-non-cmake-output.md index 987437e..5ff5e3d 100644 --- a/.github/testrepo_comment_fixtures/test-branch-fork__sa-non-cmake-output.md +++ b/.github/testrepo_comment_fixtures/test-branch-fork__sa-non-cmake-output.md @@ -54,7 +54,7 @@ int evaluate(int x) { ``` ```diff -!Line: 9 - warning: Class 'DataProcessor' does not have a copy constructor which is recommended since it has dynamic memory/resource allocation(s). [noCopyConstructor] +!Line: 9 - warning: Class 'DataProcessor' does not have a copy constructor which is recommended since it has dynamic memory/resource management. [noCopyConstructor] ```
@@ -74,7 +74,7 @@ int evaluate(int x) { ``` ```diff -!Line: 9 - warning: Class 'DataProcessor' does not have a operator= which is recommended since it has dynamic memory/resource allocation(s). [noOperatorEq] +!Line: 9 - warning: Class 'DataProcessor' does not have a operator= which is recommended since it has dynamic memory/resource management. [noOperatorEq] ```
diff --git a/.github/testrepo_comment_fixtures/test-static-analysis__sa-cmake-output.md b/.github/testrepo_comment_fixtures/test-static-analysis__sa-cmake-output.md index 7338993..fa6b473 100644 --- a/.github/testrepo_comment_fixtures/test-static-analysis__sa-cmake-output.md +++ b/.github/testrepo_comment_fixtures/test-static-analysis__sa-cmake-output.md @@ -4,7 +4,7 @@ https://github.com/JacobDomagala/TestRepo/blob//source.cpp#L9-L14 ```diff -!Line: 9 - warning: Class 'Example' does not have a copy constructor which is recommended since it has dynamic memory/resource allocation(s). [noCopyConstructor] +!Line: 9 - warning: Class 'Example' does not have a copy constructor which is recommended since it has dynamic memory/resource management. [noCopyConstructor] ```
@@ -13,7 +13,7 @@ https://github.com/JacobDomagala/TestRepo/blob//source.cpp#L9-L14 https://github.com/JacobDomagala/TestRepo/blob//source.cpp#L9-L14 ```diff -!Line: 9 - warning: Class 'Example' does not have a operator= which is recommended since it has dynamic memory/resource allocation(s). [noOperatorEq] +!Line: 9 - warning: Class 'Example' does not have a operator= which is recommended since it has dynamic memory/resource management. [noOperatorEq] ```
@@ -57,7 +57,7 @@ https://github.com/JacobDomagala/TestRepo/blob//source.cpp#L41-L44 *** -
:red_circle: clang-tidy found 21 issues! Click here to see details.
+
:red_circle: clang-tidy found 24 issues! Click here to see details.
https://github.com/JacobDomagala/TestRepo/blob//another_source.cpp#L1-L3 ```diff @@ -77,6 +77,15 @@ https://github.com/JacobDomagala/TestRepo/blob//source.cpp#L2-L7 +https://github.com/JacobDomagala/TestRepo/blob//source.cpp#L5-L10 +```diff +!Line: 5 - error: class 'Example' can be moved into an anonymous namespace to enforce internal linkage [misc-use-internal-linkage,-warnings-as-errors] + +``` +
+ + + https://github.com/JacobDomagala/TestRepo/blob//source.cpp#L5-L10 ```diff !Line: 5 - error: class 'Example' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions,-warnings-as-errors] @@ -212,6 +221,15 @@ https://github.com/JacobDomagala/TestRepo/blob//source.cpp#L33-L38 +https://github.com/JacobDomagala/TestRepo/blob//source.cpp#L36-L41 +```diff +!Line: 35 - error: pointee of variable 'ptr' of type 'int *' can be declared 'const' [misc-const-correctness,-warnings-as-errors] + +``` +
+ + + https://github.com/JacobDomagala/TestRepo/blob//source.cpp#L36-L41 ```diff !Line: 36 - error: do not use 'std::endl' with streams; use '\n' instead [performance-avoid-endl,-warnings-as-errors] @@ -221,6 +239,15 @@ https://github.com/JacobDomagala/TestRepo/blob//source.cpp#L36-L41 +https://github.com/JacobDomagala/TestRepo/blob//source.cpp#L39-L44 +```diff +!Line: 39 - error: possibly unsafe 'operator[]', consider bounds-safe alternatives [cppcoreguidelines-pro-bounds-avoid-unchecked-container-access,-warnings-as-errors] + +``` +
+ + + https://github.com/JacobDomagala/TestRepo/blob//source.cpp#L39-L44 ```diff !Line: 39 - error: 10 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers,-warnings-as-errors] diff --git a/.github/testrepo_comment_fixtures/test-static-analysis__sa-non-cmake-output.md b/.github/testrepo_comment_fixtures/test-static-analysis__sa-non-cmake-output.md index e779c6a..596dcf2 100644 --- a/.github/testrepo_comment_fixtures/test-static-analysis__sa-non-cmake-output.md +++ b/.github/testrepo_comment_fixtures/test-static-analysis__sa-non-cmake-output.md @@ -4,7 +4,7 @@ https://github.com/JacobDomagala/TestRepo/blob//source.cpp#L9-L14 ```diff -!Line: 9 - warning: Class 'Example' does not have a copy constructor which is recommended since it has dynamic memory/resource allocation(s). [noCopyConstructor] +!Line: 9 - warning: Class 'Example' does not have a copy constructor which is recommended since it has dynamic memory/resource management. [noCopyConstructor] ```
@@ -13,7 +13,7 @@ https://github.com/JacobDomagala/TestRepo/blob//source.cpp#L9-L14 https://github.com/JacobDomagala/TestRepo/blob//source.cpp#L9-L14 ```diff -!Line: 9 - warning: Class 'Example' does not have a operator= which is recommended since it has dynamic memory/resource allocation(s). [noOperatorEq] +!Line: 9 - warning: Class 'Example' does not have a operator= which is recommended since it has dynamic memory/resource management. [noOperatorEq] ```
diff --git a/.github/testrepo_console_fixtures/test-static-analysis__sa-cmake-output.txt b/.github/testrepo_console_fixtures/test-static-analysis__sa-cmake-output.txt index 1a7c799..ca11fdb 100644 --- a/.github/testrepo_console_fixtures/test-static-analysis__sa-cmake-output.txt +++ b/.github/testrepo_console_fixtures/test-static-analysis__sa-cmake-output.txt @@ -1,7 +1,7 @@ ##[error] Issues found! cppcheck results: -/github/workspace/source.cpp:9: warning: Class 'Example' does not have a copy constructor which is recommended since it has dynamic memory/resource allocation(s). [noCopyConstructor] -/github/workspace/source.cpp:9: warning: Class 'Example' does not have a operator= which is recommended since it has dynamic memory/resource allocation(s). [noOperatorEq] +/github/workspace/source.cpp:9: warning: Class 'Example' does not have a copy constructor which is recommended since it has dynamic memory/resource management. [noCopyConstructor] +/github/workspace/source.cpp:9: warning: Class 'Example' does not have a operator= which is recommended since it has dynamic memory/resource management. [noOperatorEq] /github/workspace/source.cpp:36: error: Null pointer dereference: ptr [nullPointer] /github/workspace/source.cpp:35: note: Assignment 'ptr=nullptr', assigned value is 0 /github/workspace/source.cpp:36: note: Null pointer dereference @@ -11,6 +11,7 @@ cppcheck results: clang-tidy results: /github/workspace/another_source.cpp:1: error: function 'do_nothing' can be made static or moved into an anonymous namespace to enforce internal linkage [misc-use-internal-linkage,-warnings-as-errors] /github/workspace/source.cpp:2: error: included header string is not used directly [misc-include-cleaner,-warnings-as-errors] +/github/workspace/source.cpp:5: error: class 'Example' can be moved into an anonymous namespace to enforce internal linkage [misc-use-internal-linkage,-warnings-as-errors] /github/workspace/source.cpp:5: error: class 'Example' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions,-warnings-as-errors] /github/workspace/source.cpp:9: error: 42 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers,-warnings-as-errors] /github/workspace/source.cpp:11: error: parameter name 'p' is too short, expected at least 3 characters [readability-identifier-length,-warnings-as-errors] @@ -26,7 +27,9 @@ clang-tidy results: /github/workspace/source.cpp:32: error: variable 'y' of type 'int' can be declared 'const' [misc-const-correctness,-warnings-as-errors] /github/workspace/source.cpp:32: error: variable name 'y' is too short, expected at least 3 characters [readability-identifier-length,-warnings-as-errors] /github/workspace/source.cpp:33: error: do not use 'std::endl' with streams; use '\n' instead [performance-avoid-endl,-warnings-as-errors] +/github/workspace/source.cpp:35: error: pointee of variable 'ptr' of type 'int *' can be declared 'const' [misc-const-correctness,-warnings-as-errors] /github/workspace/source.cpp:36: error: do not use 'std::endl' with streams; use '\n' instead [performance-avoid-endl,-warnings-as-errors] +/github/workspace/source.cpp:39: error: possibly unsafe 'operator[]', consider bounds-safe alternatives [cppcoreguidelines-pro-bounds-avoid-unchecked-container-access,-warnings-as-errors] /github/workspace/source.cpp:39: error: 10 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers,-warnings-as-errors] /github/workspace/source.cpp:39: error: do not use 'std::endl' with streams; use '\n' instead [performance-avoid-endl,-warnings-as-errors] /github/workspace/source.cpp:41: error: variable 'unusedvec' of type 'std::vector' can be declared 'const' [misc-const-correctness,-warnings-as-errors] diff --git a/.github/testrepo_console_fixtures/test-static-analysis__sa-non-cmake-output.txt b/.github/testrepo_console_fixtures/test-static-analysis__sa-non-cmake-output.txt index 1a7c799..ca11fdb 100644 --- a/.github/testrepo_console_fixtures/test-static-analysis__sa-non-cmake-output.txt +++ b/.github/testrepo_console_fixtures/test-static-analysis__sa-non-cmake-output.txt @@ -1,7 +1,7 @@ ##[error] Issues found! cppcheck results: -/github/workspace/source.cpp:9: warning: Class 'Example' does not have a copy constructor which is recommended since it has dynamic memory/resource allocation(s). [noCopyConstructor] -/github/workspace/source.cpp:9: warning: Class 'Example' does not have a operator= which is recommended since it has dynamic memory/resource allocation(s). [noOperatorEq] +/github/workspace/source.cpp:9: warning: Class 'Example' does not have a copy constructor which is recommended since it has dynamic memory/resource management. [noCopyConstructor] +/github/workspace/source.cpp:9: warning: Class 'Example' does not have a operator= which is recommended since it has dynamic memory/resource management. [noOperatorEq] /github/workspace/source.cpp:36: error: Null pointer dereference: ptr [nullPointer] /github/workspace/source.cpp:35: note: Assignment 'ptr=nullptr', assigned value is 0 /github/workspace/source.cpp:36: note: Null pointer dereference @@ -11,6 +11,7 @@ cppcheck results: clang-tidy results: /github/workspace/another_source.cpp:1: error: function 'do_nothing' can be made static or moved into an anonymous namespace to enforce internal linkage [misc-use-internal-linkage,-warnings-as-errors] /github/workspace/source.cpp:2: error: included header string is not used directly [misc-include-cleaner,-warnings-as-errors] +/github/workspace/source.cpp:5: error: class 'Example' can be moved into an anonymous namespace to enforce internal linkage [misc-use-internal-linkage,-warnings-as-errors] /github/workspace/source.cpp:5: error: class 'Example' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions,-warnings-as-errors] /github/workspace/source.cpp:9: error: 42 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers,-warnings-as-errors] /github/workspace/source.cpp:11: error: parameter name 'p' is too short, expected at least 3 characters [readability-identifier-length,-warnings-as-errors] @@ -26,7 +27,9 @@ clang-tidy results: /github/workspace/source.cpp:32: error: variable 'y' of type 'int' can be declared 'const' [misc-const-correctness,-warnings-as-errors] /github/workspace/source.cpp:32: error: variable name 'y' is too short, expected at least 3 characters [readability-identifier-length,-warnings-as-errors] /github/workspace/source.cpp:33: error: do not use 'std::endl' with streams; use '\n' instead [performance-avoid-endl,-warnings-as-errors] +/github/workspace/source.cpp:35: error: pointee of variable 'ptr' of type 'int *' can be declared 'const' [misc-const-correctness,-warnings-as-errors] /github/workspace/source.cpp:36: error: do not use 'std::endl' with streams; use '\n' instead [performance-avoid-endl,-warnings-as-errors] +/github/workspace/source.cpp:39: error: possibly unsafe 'operator[]', consider bounds-safe alternatives [cppcoreguidelines-pro-bounds-avoid-unchecked-container-access,-warnings-as-errors] /github/workspace/source.cpp:39: error: 10 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers,-warnings-as-errors] /github/workspace/source.cpp:39: error: do not use 'std::endl' with streams; use '\n' instead [performance-avoid-endl,-warnings-as-errors] /github/workspace/source.cpp:41: error: variable 'unusedvec' of type 'std::vector' can be declared 'const' [misc-const-correctness,-warnings-as-errors] From 340e6eea954d62ed7b85d5cc7c5c2548f8df547c Mon Sep 17 00:00:00 2001 From: JacobDomagala Date: Tue, 28 Oct 2025 13:23:12 +0100 Subject: [PATCH 5/5] [#148]: Add better information about image sizes --- .../workflows/build_static_analysis_image.yml | 32 ++++++++++++++++--- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_static_analysis_image.yml b/.github/workflows/build_static_analysis_image.yml index eb7b78f..f17e6c5 100644 --- a/.github/workflows/build_static_analysis_image.yml +++ b/.github/workflows/build_static_analysis_image.yml @@ -48,15 +48,39 @@ jobs: - name: Print image size run: | set -euo pipefail - size_bytes="$(docker image inspect static-analysis-base:ci --format '{{.Size}}')" - size_human="$(numfmt --to=iec-i --suffix=B "$size_bytes")" - echo "static-analysis-base:ci size: ${size_human} (${size_bytes} bytes)" + human_size() { + numfmt --to=iec-i --suffix=B "$1" + } + + compressed_size() { + local image="$1" + docker save "$image" | gzip -c | wc -c | tr -d ' ' + } + + ci_image="static-analysis-base:ci" + latest_image="${DOCKERHUB_IMAGE}:latest" + + docker pull "$latest_image" >/dev/null + + latest_uncompressed_bytes="$(docker image inspect "$latest_image" --format '{{.Size}}')" + latest_compressed_bytes="$(compressed_size "$latest_image")" + ci_uncompressed_bytes="$(docker image inspect "$ci_image" --format '{{.Size}}')" + ci_compressed_bytes="$(compressed_size "$ci_image")" + + printf "%-34s %14s %14s\n" "Image" "Uncompressed" "Compressed" + printf "%-34s %14s %14s\n" "$latest_image" "$(human_size "$latest_uncompressed_bytes")" "$(human_size "$latest_compressed_bytes")" + printf "%-34s %14s %14s\n" "$ci_image" "$(human_size "$ci_uncompressed_bytes")" "$(human_size "$ci_compressed_bytes")" { echo "### Docker Image Size" echo - echo "- \`static-analysis-base:ci\`: ${size_human} (${size_bytes} bytes)" + echo "| Image | Uncompressed | Compressed |" + echo "| --- | ---: | ---: |" + echo "| Current Docker Hub latest | $(human_size "$latest_uncompressed_bytes") | $(human_size "$latest_compressed_bytes") |" + echo "| New build | $(human_size "$ci_uncompressed_bytes") | $(human_size "$ci_compressed_bytes") |" + echo + echo "Compressed size is measured with \`docker save | gzip\`." } >> "$GITHUB_STEP_SUMMARY" - name: Build action image