Commit 2a420dbcd2

2a420dbcd2ecc545737f312e1ca5f53f18c8eac6

parent: 9af155d40a

Unsigned

cmc <hello@cleberg.net> · 2026-08-08 20:32 UTC

Fix a11y labels, Docker quoting, pin Actions to SHA, correct input type

Layout: unified · split

.github/workflows/release.yml +6 −6
@@ -20,15 +20,15 @@ jobs:
2020 attestations: write
2121 steps:
2222 - name: Checkout
23 uses: actions/checkout@v7
23 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
2424
2525 # The Dockerfile cross-compiles with Go's GOOS/GOARCH from $BUILDPLATFORM,
2626 # so no QEMU emulation is needed for the arm64 image.
2727 - name: Set up Buildx
28 uses: docker/setup-buildx-action@v4
28 uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4
2929
3030 - name: Log in to ${{ env.REGISTRY }}
31 uses: docker/login-action@v4
31 uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4
3232 with:
3333 registry: ${{ env.REGISTRY }}
3434 username: ${{ github.actor }}
@@ -36,7 +36,7 @@ jobs:
3636
3737 - name: Derive tags and labels
3838 id: meta
39 uses: docker/metadata-action@v6
39 uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 # v6
4040 with:
4141 images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
4242 # A semver tag v1.3.4 publishes 1.3.4, 1.3, 1 and latest.
@@ -53,7 +53,7 @@ jobs:
5353
5454 - name: Build and push
5555 id: build
56 uses: docker/build-push-action@v7
56 uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7
5757 with:
5858 context: .
5959 platforms: linux/amd64,linux/arm64
@@ -68,7 +68,7 @@ jobs:
6868 cache-to: type=gha,mode=max
6969
7070 - name: Attest build provenance
71 uses: actions/attest-build-provenance@v4
71 uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4
7272 with:
7373 subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
7474 subject-digest: ${{ steps.build.outputs.digest }}
Dockerfile +2 −1
@@ -8,7 +8,8 @@ ARG VERSION=dev
88
99WORKDIR /build
1010COPY . .
11RUN CGO_ENABLED=0 GOARCH=${TARGETARCH} GOOS=${TARGETOS} go build -ldflags "-s -w -extldflags '-static' -X main.version=${VERSION}" && \
11RUN CGO_ENABLED=0 GOARCH="${TARGETARCH}" GOOS="${TARGETOS}" \
12 go build -ldflags "-s -w -extldflags '-static' -X main.version=${VERSION}" && \
1213 echo "skunkyart:x:10000:10000:SkunkyArt user:/:/sbin/nologin" > /etc/minimal-passwd && \
1314 echo "skunkyart:x:10000:" > /etc/minimal-group
1415
app/cache_test.go +1 −1
@@ -278,7 +278,7 @@ func TestAgeMemCacheEvicts(t *testing.T) {
278278 if got := memGet(cold); got != nil {
279279 t.Errorf("cold entry survived aging: got %q, want nil", got)
280280 }
281 if got := memGet(hot); got == nil {
281 if memGet(hot) == nil {
282282 t.Error("hot entry was evicted after a hit, want it kept")
283283 }
284284}
app/wrapper.go +3 −3
@@ -89,7 +89,7 @@ func (s skunkyart) GRUser() {
8989
9090 folderid, _ := strconv.Atoi(s.Args.Get("folder"))
9191
92 if a := s.Args.Get("all"); a == "true" {
92 if s.Args.Get("all") == "true" {
9393 all = true
9494 }
9595
@@ -115,7 +115,7 @@ func (s skunkyart) GRUser() {
115115 })
116116 } else {
117117 for _, x := range content.Content.Gruser.Page.Modules {
118 if l := len(x.ModuleData.Folders.Results); l != 0 {
118 if len(x.ModuleData.Folders.Results) != 0 {
119119 var folders strings.Builder
120120 folders.WriteString(`<h1 id="folders"><a href="#folder">#</a> Folders</h1><div class="folders"><br>`)
121121 for _, x := range x.ModuleData.Folders.Results {
@@ -309,7 +309,7 @@ func (s skunkyart) Search() {
309309 }
310310 }
311311
312 if l := len(usernames); l != 0 {
312 if len(usernames) != 0 {
313313 ss.List += `<div class="content plates">`
314314 for x := range len(usernames) {
315315 ss.List += BuildUserPlate(s.Host, usernames[x])
static/html/about.htm +1 −1
@@ -1,5 +1,5 @@
11<!DOCTYPE html>
2<html>
2<html lang="en">
33 {{template "head" .}}
44 <main>
55 {{template "header" .}}
static/html/daily.htm +1 −1
@@ -1,5 +1,5 @@
11<!DOCTYPE html>
2<html>
2<html lang="en">
33 {{template "head" . }}
44 <main>
55 {{template "header" . }}
static/html/deviantion.htm +3 −3
@@ -1,10 +1,10 @@
11<!DOCTYPE html>
2<html>
2<html lang="en">
33 {{template "head" . }}
44 <main>
55 {{template "header" . }}
66 <figure>
7 <img src="{{.BasePath}}media/emojitar/{{.Templates.Deviation.Post.Deviation.Author.Username}}?type=a" width="30px">
7 <img src="{{.BasePath}}media/emojitar/{{.Templates.Deviation.Post.Deviation.Author.Username}}?type=a" width="30px" alt="{{.Templates.Deviation.Post.Deviation.Author.Username}} avatar">
88 <span><strong><a href="{{.BasePath}}group_user?type=about&q={{.Templates.Deviation.Post.Deviation.Author.Username}}">{{.Templates.Deviation.Post.Deviation.Author.Username}}</a></strong> — {{if (.Templates.Deviation.Post.Deviation.DD)}}
99 <span class="dd" title="Daily Deviation!"><b>{{.Templates.Deviation.Post.Deviation.Title}}</b></span>
1010 {{else}}{{.Templates.Deviation.Post.Deviation.Title}}{{end}}
@@ -13,7 +13,7 @@
1313 </span>
1414 <br>
1515 {{if (ne .Templates.Deviation.Post.IMG "")}}
16 <a href="{{.Templates.Deviation.Post.IMG}}" title="open/download image"><img src="{{.Templates.Deviation.Post.IMG}}" width="50%"></a>
16 <a href="{{.Templates.Deviation.Post.IMG}}" title="open/download image"><img src="{{.Templates.Deviation.Post.IMG}}" width="50%" alt="{{.Templates.Deviation.Post.Deviation.Title}}"></a>
1717 <br>
1818 {{end}}
1919 {{if (ne .Templates.Deviation.Tags "")}}
static/html/gruser.htm +5 −5
@@ -1,5 +1,5 @@
11<!DOCTYPE html>
2<html>
2<html lang="en">
33 {{template "head" . }}
44 <main>
55 <header>
@@ -17,9 +17,9 @@
1717 | <a href="group_user?q={{.Templates.GroupUser.GR.Owner.Username}}&type=gallery&atom=true">RSS</a>
1818 </h1>
1919 <form method="get" action="{{.BasePath}}search">
20 <input type="gallery" name="q" placeholder="Search for ..." autocomplete="off" autocapitalize="none" spellcheck="false">
20 <input type="text" name="q" aria-label="Search query" placeholder="Search for ..." autocomplete="off" autocapitalize="none" spellcheck="false">
2121 <input type="hidden" name="usr" value="{{.Templates.GroupUser.GR.Owner.Username}}">
22 <select name="type">
22 <select name="type" aria-label="Search type">
2323 <option value="gallery">Gallery</option>
2424 <option value="folders">Folders</option>
2525 <option value="all">All</option>
@@ -31,11 +31,11 @@
3131 </header>
3232 {{if eq .Type 'a'}}
3333 {{if and (and (ne .Templates.About.Nsfw true) (ne .Templates.GroupUser.About.BGMeta.NSFW true)) (ne .Templates.GroupUser.About.BG "")}}
34 <a href="{{.Templates.GroupUser.About.BGMeta.Url}}" class="ubg"><img title="{{if ne .Templates.GroupUser.GR.Owner.Username .Templates.GroupUser.About.BGMeta.Author.Username}}
34 <a href="{{.Templates.GroupUser.About.BGMeta.Url}}" class="ubg"><img alt="Profile background" title="{{if ne .Templates.GroupUser.GR.Owner.Username .Templates.GroupUser.About.BGMeta.Author.Username}}
3535 {{.Templates.GroupUser.About.BGMeta.Author.Username}} - {{end}}{{.Templates.GroupUser.About.BGMeta.Title}}" src="{{.Templates.GroupUser.About.BG}}"></a>
3636 {{end}}
3737
38 <img src="{{.BasePath}}media/emojitar/{{.Templates.GroupUser.GR.Owner.Username}}?type=a" width="30px" height="30px"> <b>{{.Templates.GroupUser.GR.Owner.Username}}</b>
38 <img src="{{.BasePath}}media/emojitar/{{.Templates.GroupUser.GR.Owner.Username}}?type=a" width="30px" height="30px" alt="{{.Templates.GroupUser.GR.Owner.Username}} avatar"> <b>{{.Templates.GroupUser.GR.Owner.Username}}</b>
3939 {{if (eq .Templates.GroupUser.About.A.Gender "male")}}
4040 ♂️
4141 {{end}}
static/html/head.htm +1 −1
@@ -21,6 +21,6 @@
2121 <meta name="referrer" content="no-referrer" />
2222 <link rel="stylesheet" href="{{.BasePath}}stylesheet">
2323 <link rel="icon" type="image/x-icon" href="{{.BasePath}}favicon.ico">
24 <meta name="viewport" content="width=device-width, height=device-height, initial-scale=0.4, user-scalable=no"/>
24 <meta name="viewport" content="width=device-width, height=device-height, initial-scale=0.4"/>
2525</head>
2626{{end}}
\ No newline at end of file
static/html/header.htm +2 −2
@@ -2,8 +2,8 @@
22<header>
33 <h1><a href="">HOME</a> | <a href="dd">DD</a> {{if eq .Endpoint "dd"}}| <a href="{{.Endpoint}}?atom=true">RSS</a>{{end}}</h1>
44 <form method="get" action="search">
5 <input type="text" name="q" placeholder="Search for ..." autocomplete="off" autocapitalize="none" spellcheck="false" value="{{.QueryRaw}}">
6 <select name="type">
5 <input type="text" name="q" aria-label="Search query" placeholder="Search for ..." autocomplete="off" autocapitalize="none" spellcheck="false" value="{{.QueryRaw}}">
6 <select name="type" aria-label="Search type">
77 <option value="all">All</option>
88 <option value="tag">Tag</option>
99 <option value="r">Groups</option>
static/html/index.htm +5 −5
@@ -1,10 +1,10 @@
11<!DOCTYPE html>
2<html>
2<html lang="en">
33 <head>
44 <title>SkunkyArt</title>
55 <link rel="stylesheet" href="{{.}}stylesheet"/>
66 <link rel="icon" type="image/x-icon" href="{{.}}favicon.ico">
7 <meta name="viewport" content="width=device-width, height=device-height, initial-scale=0.4, user-scalable=no; user-scalable=0"/>
7 <meta name="viewport" content="width=device-width, height=device-height, initial-scale=0.4"/>
88
99 <style>
1010 main {
@@ -70,12 +70,12 @@
7070 </style>
7171 </head>
7272 <main>
73 <img src="{{.}}favicon.ico" title="SkunkyArt logo" draggable="false">
73 <img src="{{.}}favicon.ico" title="SkunkyArt logo" alt="SkunkyArt logo" draggable="false">
7474 <div>
7575 <h1><a href="{{.}}dd">Daily Deviations</a> | <a href="{{.}}about">About</a></h1>
7676 <form method="get" action="{{.}}search">
77 <input type="text" name="q" placeholder="Search for ..." autocomplete="off" autocapitalize="none" spellcheck="false">
78 <select name="type">
77 <input type="text" name="q" aria-label="Search query" placeholder="Search for ..." autocomplete="off" autocapitalize="none" spellcheck="false">
78 <select name="type" aria-label="Search type">
7979 <option value="all">All</option>
8080 <option value="tag">Tag</option>
8181 <option value="r">Groups</option>
static/html/search.htm +1 −1
@@ -1,5 +1,5 @@
11<!DOCTYPE html>
2<html>
2<html lang="en">
33 {{template "head" . }}
44 <main>
55 {{template "header" . }}