check / check (push) Successful in 4m51s
The canonical files are fetched whole from sneak/prompts at dd4027b. Kept after the canonical content: the livednstest deny entry in .golangci.yml, /bin in .dockerignore, this repo's own .gitignore lines and a [*.go] tab section in .editorconfig. The workflow keeps its concurrency block and persist-credentials: false. Lint and test are phases of the Dockerfile (golangci-lint v2.14.0; tests on the Debian Go 1.25.7 image as an ordinary user, with the same flags); the build stage depends on both and stamps the version the canonical way. Dockerfile.lint is gone; the prettier stages of Dockerfile.fmt moved into the Dockerfile. Every scripted docker build passes --no-cache; script/cibuild bootstraps, runs script/check, then builds the image. script/fmt-check absorbs fmt-check-go and fmt-check-markdown. Model: opus-5-5
29 lines
1.0 KiB
Bash
Executable File
29 lines
1.0 KiB
Bash
Executable File
#!/bin/sh
|
|
# script/cibuild: run the CI build. It bootstraps first: a CI runner
|
|
# checks out and runs this and nothing else, and script/fmt-check runs
|
|
# the formatter on the host, which a pristine checkout cannot do.
|
|
# --no-cache for the same reason as script/docker: the gate phases the
|
|
# final stage depends on are RUN steps, and a cached one is a check that
|
|
# did not run.
|
|
set -eu
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd -P)"
|
|
ROOT="$(cd "$SCRIPT_DIR/.." && pwd -P)"
|
|
|
|
main() {
|
|
cd "$ROOT"
|
|
"$SCRIPT_DIR/bootstrap"
|
|
"$SCRIPT_DIR/check"
|
|
# Own line: a failing command substitution inside an argument does
|
|
# not trip `set -e`, so the inline form degrades silently to an
|
|
# empty constant. The VERSION build argument takes precedence over
|
|
# the version a build stage derives from the .git in the context.
|
|
version="$(git describe --tags --always --dirty 2>/dev/null || true)"
|
|
[ -n "$version" ] || version="unknown"
|
|
docker build --no-cache \
|
|
--build-arg VERSION="$version" \
|
|
-t "$("$SCRIPT_DIR/projectname")" .
|
|
}
|
|
|
|
main "$@"
|