5 Commits

Author SHA1 Message Date
Eric Coissac ca986633b1 Add the freeze option to quarto 2026-05-12 14:11:20 +08:00
Eric Coissac 19e9bba3cc ??? 2026-05-12 14:11:20 +08:00
Eric Coissac 0d75c08f6a ci: enforce strict registry auth and optimize quarto builds
Replace the conditional Docker login check with a direct, non-interactive authentication call that fails immediately on invalid credentials. Update comments to clarify skopeo versus Docker credential store behavior. Additionally, add `freeze: auto` to the Quarto configuration to automatically cache code cell outputs, preventing redundant re-computation and optimizing build performance.
2026-05-12 13:54:34 +08:00
coissac 6a2f207d8d Merge pull request 'Simplify registry authentication logic and update comments' (#11) from push-wzvpxqqoyvkr into master
Reviewed-on: #11
2026-05-04 13:18:45 +00:00
Eric Coissac b79bb06130 Simplify registry authentication logic and update comments
Updates the script comment to reference skopeo and clarifies the pre-build authentication check. Removes the conditional docker login wrapper and intermediate prompts, now executing docker login directly. The script will fail fast with a clear error message if authentication fails.
2026-05-04 15:17:47 +02:00
2 changed files with 11 additions and 10 deletions
+8 -10
View File
@@ -266,17 +266,15 @@ publish_images() {
version=$(read_version)
# docker buildx --push uses Docker's own credential store, independent of
# skopeo. Verify auth early to get a clear error before a long build.
echo -e "${BLUE}Checking registry authentication...${NC}"
# skopeo. Prompt once before the (long) build so the user isn't surprised
# by an auth failure at the very end.
local registry_host="${REGISTRY%%/*}"
if ! docker login "$registry_host" >/dev/null 2>&1; then
echo -e "${YELLOW}Not logged in to ${registry_host}. Running docker login...${NC}"
docker login "$registry_host" || {
echo "Error: authentication to ${registry_host} failed." >&2
echo "Run: docker login ${registry_host}" >&2
exit 1
}
fi
echo -e "${BLUE}Authenticating to ${registry_host} (required to push)...${NC}"
docker login "$registry_host" || {
echo "Error: authentication to ${registry_host} failed." >&2
echo "Run: docker login ${registry_host}" >&2
exit 1
}
echo ""
echo -e "${BLUE}Publishing images (version ${version}) to ${REGISTRY}${NC}"
+3
View File
@@ -4,6 +4,9 @@ project:
post-render:
- scripts/copy-to-web.sh
execute:
freeze: auto
format:
html:
toc: false