Merge pull request #20584 from dvdksn/housekeeping

hugo/build/ci housekeeping
This commit is contained in:
David Karlsson 2024-08-14 09:52:36 +02:00 committed by GitHub
commit fd2dbcf9b4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 40 additions and 35 deletions

View File

@ -56,6 +56,8 @@ jobs:
- test
- unused-media
- test-go-redirects
- dockerfile-lint
- path-warnings
steps:
-
name: Checkout

View File

@ -1,4 +1,5 @@
# syntax=docker/dockerfile-upstream:master
# check=skip=InvalidBaseImagePlatform
# ALPINE_VERSION sets the Alpine Linux version for all Alpine stages
ARG ALPINE_VERSION=3.20
@ -20,7 +21,7 @@ RUN npm install
# hugo downloads and extracts the Hugo binary
FROM base AS hugo
ARG HUGO_VERSION=0.127.0
ARG HUGO_VERSION=0.132.0
ARG TARGETARCH
WORKDIR /tmp/hugo
RUN wget -O "hugo.tar.gz" "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-${TARGETARCH}.tar.gz"
@ -44,7 +45,7 @@ ARG DOCS_URL
RUN hugo --gc --minify -d /out -e $HUGO_ENV -b $DOCS_URL
# lint lints markdown files
FROM davidanson/markdownlint-cli2:v0.12.1 AS lint
FROM davidanson/markdownlint-cli2:v0.13.0 AS lint
USER root
RUN --mount=type=bind,target=. \
/usr/local/bin/markdownlint-cli2 \
@ -108,6 +109,18 @@ set -ex
./scripts/test_unused_media.sh
EOT
# path-warnings checks for duplicate target paths
FROM build-base AS path-warnings
RUN hugo --printPathWarnings > /path-warnings.txt
RUN <<EOT
DUPLICATE_TARGETS=$(grep "Duplicate target paths" /path-warnings.txt)
if [ ! -z "$DUPLICATE_TARGETS" ]; then
echo "$DUPLICATE_TARGETS"
echo "You probably have a duplicate alias defined. Please check your aliases."
exit 1
fi
EOT
# pagefind installs the Pagefind runtime
FROM base AS pagefind
ARG PAGEFIND_VERSION=1.1.0

View File

@ -9,7 +9,6 @@ aliases:
- /engine/admin/reference/logging/
- /engine/admin/logging/logentries/
- /engine/admin/logging/overview/
- /engine/admin/logging/
- /config/containers/logging/configure/
---

View File

@ -4,7 +4,6 @@ toc_max: 2
keywords: authentication, registry.json, configure, enforce sign-in, docker desktop, security,
title: Enforce sign-in for Docker Desktop
aliases:
- /docker-hub/configure-sign-in/
- /security/for-admins/configure-sign-in/
---

View File

@ -32,7 +32,7 @@ target "release" {
}
group "validate" {
targets = ["lint", "test", "unused-media", "test-go-redirects"]
targets = ["lint", "test", "unused-media", "test-go-redirects", "dockerfile-lint", "path-warnings"]
}
target "test" {
@ -59,6 +59,15 @@ target "test-go-redirects" {
provenance = false
}
target "dockerfile-lint" {
call = "check"
}
target "path-warnings" {
target = "path-warnings"
output = ["type=cacheonly"]
}
#
# releaser targets are defined in _releaser/Dockerfile
# and are used for AWS S3 deployment

View File

@ -12,7 +12,7 @@
{{ partial "guides-stepper.html" . }}
{{ end }}
<div class="block lg:hidden">
{{ partial "pagemeta.html" . }}
{{ partialCached "pagemeta.html" . . }}
<hr>
</div>
{{ .Content }}

View File

@ -1,6 +1,6 @@
<aside class="py-4 space-y-4">
{{ partial "github-links.html" . }}
<div id="TableOfContents">
{{ partial "pagemeta.html" . }}
{{ partialCached "pagemeta.html" . . }}
</div>
</aside>

View File

@ -1,2 +0,0 @@
> This feature is supported in BuildKit version `{{ .Get "buildkit_v" }}`
> and Buildx version `{{ .Get "buildx_v" }}`.

View File

@ -41,18 +41,16 @@ Depends on site.Params.min_version_thresholds and i18n strings for component IDs
{{ end }}
{{ end }}
{{- if $versionAboveThreshold }}
<div class="text-gray-light dark:text-gray-dark flex items-center gap-2">
<span class="icon-svg flex items-center">{{ partial "icon.html" "chevron_right" }}</span>
<span>Introduced in {{ T $component }} version
{{- if $link }}
{{ page.RenderString (fmt.Printf `[%s](%s)` $v $link) }}
{{- else }}
{{ $v }}
{{- end }}
</span>
</div>
{{- else }}
{{ warnf "[introduced] version below threshold: %s %s %v" $component $v $pos }}
<div class="text-gray-light dark:text-gray-dark flex items-center gap-2">
<span class="icon-svg flex items-center">{{ partialCached "icon.html" "chevron_right" "chevron_right" }}</span>
<span>Introduced in {{ T $component }} version
{{- if $link }}
{{ page.RenderString (fmt.Printf `[%s](%s)` $v $link) }}
{{- else }}
{{ $v }}
{{- end }}
</span>
</div>
{{- end }}
{{- else }}
{{ errorf "[introduced] invalid component: %s %v" $component $pos }}

View File

@ -1,13 +0,0 @@
{{/* Links to pages in the same section that also contain this shortcode */}}
<ul class="not-prose flex flex-wrap list-none p-0 w-full text-sm">
{{ range page.Parent.Pages }}
{{ if .HasShortcode "siblings" }}
<li class="p-1 first-of-type:rounded-l last-of-type:rounded-r px-2 dark:bg-gray-dark-100 hover:opacity-50{{ if eq page . }}
bg-blue-light-500 dark:bg-gray-dark-200
{{ end }}">
<a {{ if eq page . }} class="text-white" {{ else }} class="link !no-underline" {{ end }} href="{{ .Permalink }}">{{
.LinkTitle }}</a>
</li>
{{ end }}
{{ end }}
</ul>