Stop script/lint writing an image it never uses (closes #48)
check / check (push) Failing after 3s
check / check (push) Failing after 3s
script/lint builds Dockerfile.lint only for the exit status, but every run exported the result as an image: seconds spent exporting, and one untagged image left behind each time. It now builds with --output=type=cacheonly, so nothing is exported. CHECK_EPOCH still changes on every run, so the gate steps still run each time; the build cache is kept as before. Model: opus-5-5
This commit was merged in pull request #91.
This commit is contained in:
@@ -14,6 +14,10 @@
|
||||
# 0 in well under a second having run no linter. The PID is in the value
|
||||
# as well as the epoch because two lint runs land inside the same second
|
||||
# easily, and `date +%s` alone would cache the second one.
|
||||
#
|
||||
# The result is the build's exit status and the image is never used, so
|
||||
# --output=type=cacheonly writes none. Without it every run spends
|
||||
# seconds exporting an image and leaves it behind untagged.
|
||||
set -eu
|
||||
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd -P)"
|
||||
@@ -22,6 +26,7 @@ main() {
|
||||
cd "$ROOT"
|
||||
docker build \
|
||||
--build-arg CHECK_EPOCH="$(date +%s)-$$" \
|
||||
--output=type=cacheonly \
|
||||
-f Dockerfile.lint \
|
||||
.
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user